├── .babelrc ├── .browserslistrc ├── .editorconfig ├── .eslintrc ├── .gitignore ├── .postcssrc ├── .stylelintrc ├── LICENSE ├── README.md ├── composer.json ├── gulp-tasks ├── clean.js ├── cssnano.js ├── image.js ├── postcss.js └── translate.js ├── gulpfile.babel.js ├── includes ├── Helpers.php ├── Plugin.php ├── Settings.php ├── TemplateTags.php └── readme.md ├── languages └── wp-svg-helpers.pot ├── package.json ├── wp-svg-helpers.php └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { 4 | "targets": { 5 | "browsers": ["> 0.5%", "last 2 versions", "not dead"] 6 | } 7 | }] 8 | ], 9 | "plugins": ["@babel/plugin-proposal-class-properties"] 10 | } 11 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | # Browser support 2 | 3 | > .5% 4 | Last 2 versions 5 | not dead 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # http://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = tab 15 | 16 | [{*.js,*.json,*.yml,.babelrc,.bowerrc,.postcssrc}] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [*.txt] 21 | end_of_line = crlf 22 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": {"browser": true}, 3 | "plugins": ["compat"], 4 | "extends": "eslint-config-allenmoore" 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | release 3 | vendor 4 | composer.lock 5 | phpunit.xml 6 | .idea 7 | yarn-error.log 8 | -------------------------------------------------------------------------------- /.postcssrc: -------------------------------------------------------------------------------- 1 | { 2 | "map": "inline", 3 | "plugins": { 4 | "postcss-cssnext": { 5 | "features": { 6 | "autoprefixer": { 7 | "browsers": ["last 2 versions"] 8 | } 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["stylelint-no-unsupported-browser-features"], 3 | "extends": ["stylelint-config-allenmoore"] 4 | } 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Allen Moore 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WP SVG Helpers 2 | WP SVG Helpers makes it easy to inline SVG files into any WordPress project. 3 | 4 | Supported by [10up](https://10up.com). 5 | 6 | ## Installation 7 | 1. Upload the entire `/wp-svg-helpers` directory to the `/wp-content/plugins/` directory. 8 | 2. Activate WP SVG Helpers through the _Plugins_ menu in WordPress. 9 | 10 | ## Usage 11 | 12 | ### SVG File Path Setting 13 | The SVG file path for the activated theme can be set via a setting through the _Settings > Media_ menu in WordPress. By default, the path is set to `assets/svg/dist/`, but it can be easily changed. Follow these steps to change the file path setting: 14 | 15 | 1. Navigate to the _Settings > Media_ menu in WordPress. 16 | 2. Look for the new section in the _WordPress Media Settings Screen_ titled _SVG Helpers_. 17 | 3. Enter the correct path to your theme's SVG files in the input field. 18 | 4. Click _Save Changes_. 19 | 20 | ### Template Tags 21 | WP SVG Helpers has two template tags for use in a theme. 22 | 23 | For an inlined SVG file, use: 24 | ```php 25 | 26 | ``` 27 | 28 | For a button with an SVG file, use: 29 | ```php 30 | 31 | ``` 32 | The SVG file location is optional for buttons, but it can be easily set to either `right` or `left`. If the location is not provided, the SVG file will be located on the left by default. 33 | The `class` is the css class for the button and `a11y` allowes for developer defined accessibility attributes. 34 | 35 | 36 | #### Button Class Filter 37 | The CSS class for buttons can be easily filtered via a custom function filtering `wpsvg_button_class`. To filter the button class, use: 38 | ```php 39 | 47 | ``` 48 | 49 | #### A11y Attributes 50 | Accessibility attributes can be easily defined as a string, as such: 51 | ```php 52 | 53 | ``` 54 | 55 | ## Roadmap 56 | The Roadmap aims to outline future features. 57 | 58 | * Addition of JavaScript helper functions. 59 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "allenmoore/wp-svg-helpers", 3 | "description": "WP SVG Helpers makes it easy to inline SVG files into any WordPress project.", 4 | "version": "1.0.2", 5 | "type": "wordpress-plugin", 6 | "keywords": [ 7 | "wordpress", 8 | "wordpress plugin", 9 | "wordpress svg plugin", 10 | "svg", 11 | "inline svg", 12 | "template tag", 13 | "wordpress template tag", 14 | "svg button" 15 | ], 16 | "homepage": "https://github.com/allenmoore/wp-svg-helpers", 17 | "license": "MIT", 18 | "authors": [ 19 | { 20 | "name": "Allen Moore", 21 | "email": "am@allenmoore.co", 22 | "homepage": "https://allenmoore.co", 23 | "role": "Developer" 24 | }, 25 | { 26 | "name": "John Bloch", 27 | "homepage": "https://johnbloch.com", 28 | "role": "Developer" 29 | }, 30 | { 31 | "name": "10up", 32 | "email": "info@10up.com", 33 | "homepage": "https://10up.com", 34 | "role": "Developer" 35 | } 36 | ], 37 | "support": { 38 | "email": "am@allenmoore.co", 39 | "issues": "https://github.com/allenmoore/wp-svg-helpers/issues", 40 | "source": "https://github.com/allenmoore/wp-svg-helpers", 41 | "docs": "https://github.com/allenmoore/wp-svg-helpers#readme" 42 | }, 43 | "minimum-stability": "dev" 44 | } 45 | -------------------------------------------------------------------------------- /gulp-tasks/clean.js: -------------------------------------------------------------------------------- 1 | import chalk from 'chalk'; 2 | import del from 'del'; 3 | import gulp from 'gulp'; 4 | 5 | const log = console.log; 6 | 7 | /** 8 | * Function to clean the CSS dist folder. 9 | * 10 | * @param {Oject} atts - An Object of file properties. 11 | * @param {function} cb - The pipe sequence that gulp should run. 12 | * 13 | * @returns {void} 14 | */ 15 | gulp.task('clean', (cb) => { 16 | log(chalk.blue('--- Cleaning dist folders ---')); 17 | del(['./dist/css/**/*']); 18 | cb(); 19 | }); 20 | 21 | 22 | -------------------------------------------------------------------------------- /gulp-tasks/cssnano.js: -------------------------------------------------------------------------------- 1 | import chalk from 'chalk'; 2 | import cssnano from 'gulp-cssnano'; 3 | import filter from 'gulp-filter'; 4 | import gulp from 'gulp'; 5 | import rename from 'gulp-rename'; 6 | import sourcemaps from 'gulp-sourcemaps'; 7 | 8 | const log = console.log; 9 | 10 | /** 11 | * Function to concat all files in a src directory. 12 | * 13 | * @param {Object} atts - An Object of file properties. 14 | * @param {function} cb - The pipe sequence that gulp should run. 15 | * 16 | * @returns {void} 17 | */ 18 | gulp.task('cssnano', () => { 19 | log(chalk.magenta('--- Minifying CSS with CSSNano ---')); 20 | 21 | return gulp.src(['./dist/css/style.css']) 22 | .pipe(sourcemaps.init({loadMaps: true})) 23 | .pipe(cssnano({ 24 | autoprefixer: false, 25 | preset: 'advanced', 26 | mergeRules: false, 27 | zindex: false, 28 | convertValues: true 29 | })) 30 | .pipe(rename((path) => { 31 | path.extname = '.min.css' 32 | })) 33 | .pipe(sourcemaps.write('./')) 34 | .pipe(gulp.dest('./dist/css')) 35 | .pipe(filter('**/*.css')); 36 | }); 37 | -------------------------------------------------------------------------------- /gulp-tasks/image.js: -------------------------------------------------------------------------------- 1 | import chalk from 'chalk'; 2 | import gulp from 'gulp'; 3 | import image from 'gulp-image'; 4 | 5 | const log = console.log; 6 | 7 | /** 8 | * Function to compress all theme images. 9 | * 10 | * @param {Object} atts - An Object of file properties. 11 | * @param {function} cb - The pipe sequence that gulp should run. 12 | * 13 | * @returns {void} 14 | */ 15 | gulp.task('image', () => { 16 | const opts = { 17 | dest: './dist/images', 18 | src: ['./src/images/**/*'] 19 | }; 20 | 21 | log(chalk.green('--- Compressing Theme Images ---')); 22 | 23 | return gulp.src(opts.src) 24 | .pipe(image({ 25 | pngquant: true, 26 | optipng: false, 27 | zopflipng: true, 28 | jpegRecompress: false, 29 | mozjpeg: true, 30 | guetzli: false, 31 | gifsicle: true, 32 | svgo: true, 33 | concurrent: 10, 34 | quiet: true 35 | })) 36 | .pipe(gulp.dest(opts.dest)); 37 | }); 38 | 39 | -------------------------------------------------------------------------------- /gulp-tasks/postcss.js: -------------------------------------------------------------------------------- 1 | import atImport from 'postcss-import'; 2 | import chalk from 'chalk'; 3 | import gulp from 'gulp'; 4 | import pixrem from 'pixrem'; 5 | import postcss from 'gulp-postcss'; 6 | import presetEnv from 'postcss-preset-env'; 7 | import rename from 'gulp-rename'; 8 | import rgbaFallback from 'postcss-color-rgba-fallback'; 9 | import sourcemaps from 'gulp-sourcemaps'; 10 | 11 | const log = console.log; 12 | 13 | /** 14 | * Function to run PostCSS against files in a src directory. 15 | * 16 | * @param {Object} atts - An Object of file properties. 17 | * @param {function} cb - The pipe sequence that gulp should run. 18 | * 19 | * @returns {void} 20 | */ 21 | gulp.task('postcss', () => { 22 | const opts = { 23 | dest: './dist/css', 24 | src: [ 25 | './src/css/style.css' 26 | ] 27 | }; 28 | log(chalk.redBright('--- Running PostCSS Goodness ---')); 29 | 30 | return gulp.src(opts.src) 31 | .pipe(sourcemaps.init({loadMaps: true})) 32 | .pipe(postcss([ 33 | atImport(), 34 | presetEnv({ 35 | stage: 2, 36 | features: { 37 | 'custom-media-queries': true, 38 | 'custom-properties': true, 39 | 'image-set-function': true, 40 | 'matches-pseudo-class': true, 41 | 'media-query-ranges': true, 42 | 'nesting-rules': true, 43 | 'not-pseudo-class': true 44 | } 45 | }), 46 | pixrem(), 47 | rgbaFallback() 48 | ])) 49 | .pipe(sourcemaps.write('./')) 50 | .pipe(gulp.dest(opts.dest)); 51 | }); 52 | 53 | -------------------------------------------------------------------------------- /gulp-tasks/translate.js: -------------------------------------------------------------------------------- 1 | import chalk from 'chalk'; 2 | import gulp from 'gulp'; 3 | import notify from 'gulp-notify'; 4 | import sort from 'gulp-sort'; 5 | import wpPot from 'gulp-wp-pot'; 6 | import image from 'gulp-image'; 7 | 8 | const log = console.log; 9 | 10 | /** 11 | * Function to generate a WordPress POT Translatiojn file. 12 | * 13 | * @param {Oject} atts - An Object of file properties. 14 | * @param {function} cb - The pipe sequence that gulp should run. 15 | * 16 | * @returns {void} 17 | */ 18 | gulp.task('translate', () => { 19 | const opts = { 20 | dest: './languages', 21 | src: './**/*.php' 22 | }; 23 | 24 | log(chalk.blue('--- Generating the translation file ---')); 25 | 26 | return gulp.src(opts.src) 27 | .pipe( 28 | wpPot({ 29 | domain: 'wp-svg-helpers', 30 | package:'WP SVG Helpers', 31 | bugReport: 'https://github.com/allenmoore/wp-svg-helpers/issues', 32 | lastTranslator: 'Allen Moore ', 33 | team: 'Allen Moore ' 34 | }) 35 | ) 36 | .pipe(gulp.dest(`${opts.dest}/wp-svg-helpers.pot`)) 37 | .pipe(notify({message: '\n\n✅ ===> TRANSLATE — completed!\n', onLast: true})); 38 | }); 39 | 40 | 41 | -------------------------------------------------------------------------------- /gulpfile.babel.js: -------------------------------------------------------------------------------- 1 | import gulp from 'gulp'; 2 | import {release} from 'gulp-release-it'; 3 | import requireDir from 'require-dir'; 4 | 5 | requireDir('./gulp-tasks'); 6 | 7 | /** 8 | * Gulp task to run the Clean process. 9 | * 10 | * @param {string} 'clean-files' - The task name. 11 | * @param {function} cb - The pipe sequence that gulp should run. 12 | * 13 | * @returns {void} 14 | */ 15 | gulp.task('clean-files', gulp.series('clean', (done) => { 16 | done(); 17 | })); 18 | 19 | /** 20 | * Gulp task to run all JavaScript processes in a sequential order. 21 | * 22 | * @param {string} 'css' - The task name. 23 | * @param {function} cb - The pipe sequence that gulp should run. 24 | * 25 | * @returns {void} 26 | */ 27 | gulp.task('css', gulp.series('postcss', (done) => { 28 | done(); 29 | })); 30 | 31 | /** 32 | * Gulp task to compress all theme images. 33 | * 34 | * @param {string} 'imagemin' - The task name. 35 | * @param {function} cb - The pipe sequence that gulp should run. 36 | * 37 | * @returns {void} 38 | */ 39 | gulp.task('imagemin', gulp.series(['image'], (done) => { 40 | done(); 41 | })) 42 | 43 | /** 44 | * Gulp task to run all minification processes in a sequential order. 45 | * 46 | * @param {string} 'minify' - The task name. 47 | * @param {function} cb - The pipe sequence that gulp should run. 48 | * 49 | * @returns {void} 50 | */ 51 | gulp.task('minify', gulp.series(['cssnano'], (done) => { 52 | done(); 53 | })); 54 | 55 | /** 56 | * Gulp task to run all translation processes in a sequential order. 57 | * 58 | * @param {string} 'wppot' - The task name. 59 | * @param {function} cb - The pipe sequence that gulp should run. 60 | * 61 | * @returns {void} 62 | */ 63 | gulp.task('wppot', gulp.series(['translate'], (done) => { 64 | done(); 65 | })); 66 | 67 | /** 68 | * Gulp task to run the default build processes in a sequential order. 69 | * 70 | * @param {string} 'default' - The task name. 71 | * @param {function} cb - The pipe sequence that gulp should run. 72 | * 73 | * @returns {void} 74 | */ 75 | gulp.task('default', gulp.series(['clean-files', 'css', 'imagemin', 'minify'])); 76 | 77 | release(gulp); 78 | -------------------------------------------------------------------------------- /includes/Helpers.php: -------------------------------------------------------------------------------- 1 | get_button_class( $class ) ) . '"'; 61 | } 62 | 63 | /** 64 | * Function that returns a SVG file path. 65 | * 66 | * @author Allen Moore 67 | * @return string the constructed svg path. 68 | */ 69 | public function get_svg_path() { 70 | 71 | $theme_path = trailingslashit( get_stylesheet_directory() ); 72 | $svg_path_option = get_svg_path_option(); 73 | $svg_path = trailingslashit( $theme_path . $svg_path_option ); 74 | 75 | return $svg_path; 76 | } 77 | 78 | /** 79 | * Function that returns a SVG file url. 80 | * 81 | * @author Allen Moore 82 | * @param string $svg the name of the svg file to return. 83 | * @return string the constructed svg file url. 84 | */ 85 | public function get_svg_file_path( $svg ) { 86 | 87 | if ( empty( $svg ) ) { 88 | return; 89 | } 90 | $svg_path = $this->get_svg_path(); 91 | 92 | $svg_file_path = $svg_path . $svg . '.svg'; 93 | 94 | return $svg_file_path; 95 | } 96 | 97 | /** 98 | * Function that returns a SVG file. 99 | * 100 | * @author Allen Moore 101 | * @param string $svg the name of the svg file to return. 102 | * @return string the constructed svg file. 103 | */ 104 | public function get_svg_file( $svg ) { 105 | $output = ''; 106 | 107 | if ( empty( $svg ) ) { 108 | return; 109 | } 110 | 111 | $svg_file_path = $this->get_svg_file_path( $svg ); 112 | 113 | ob_start(); 114 | 115 | include( $svg_file_path ); 116 | 117 | $output .= ob_get_clean(); 118 | 119 | return $output; 120 | } 121 | 122 | /** 123 | * Function that returns a html button with an inlined SVG on the left. 124 | * 125 | * @author Allen Moore 126 | * @param string $svg the name of the svg file. 127 | * @param string $title the title of the button. 128 | * @param string $class the css class of the button. 129 | * @param string $a11y the a11y attributes to apply to the button. 130 | * @return mixed the constructed html button. 131 | */ 132 | public function get_left_svg_button( $svg, $title, $class = '', $a11y = '' ) { 133 | $output = ''; 134 | 135 | if ( empty( $svg ) && empty( $title ) ) { 136 | return; 137 | } 138 | 139 | $svg_file_path = $this->get_svg_file_path( $svg ); 140 | $button_id = sanitize_title_with_dashes( $title ); 141 | $a11y = ( empty( $a11y ) ? '' : $a11y ); 142 | 143 | ob_start(); 144 | ?> 145 | 146 | get_svg_file_path( $svg ); 170 | $button_id = sanitize_title_with_dashes( $title ); 171 | $a11y = ( empty( $a11y ) ? '' : $a11y ); 172 | 173 | ob_start(); 174 | ?> 175 | 176 | get_svg_file( $svg ); 194 | } 195 | 196 | /** 197 | * Function that echos a html button with a SVG icon. 198 | * 199 | * @author Allen Moore 200 | * @param string $svg the name of the svg file. 201 | * @param string $title the title of the button. 202 | * @param string $loc the location of the svg file within the button. 203 | * @param string $class the css class of the button. 204 | * @param string $a11y the a11y attributes to apply to the button. 205 | * @return void 206 | */ 207 | public function svg_button( $svg, $title, $loc = null, $class = '', $a11y = '' ) { 208 | 209 | if ( empty( $svg ) && empty( $title ) ) { 210 | return; 211 | } 212 | 213 | $loc = ( null === $loc ? 'left' : $loc ); 214 | $svg_button_cb = 'get_' . $loc . '_svg_button'; 215 | 216 | echo $this->$svg_button_cb( $svg, $title, $class, $a11y ); 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /includes/Plugin.php: -------------------------------------------------------------------------------- 1 | helpers = new Helpers(); 39 | $this->settings = new Settings(); 40 | 41 | add_action( 'init', array( $this, 'i18n' ) ); 42 | add_action( 'init', array( $this, 'init' ) ); 43 | } 44 | 45 | /** 46 | * Initializes the plugin and fires an action other plugins can hook into. 47 | * 48 | * @author Allen Moore 49 | * @return void 50 | */ 51 | public function init() { 52 | do_action( 'wp_svg_helpers_init' ); 53 | } 54 | 55 | /** 56 | * Sets up the text domain. 57 | * 58 | * @author Allen Moore 59 | * @return void 60 | */ 61 | public function i18n() { 62 | $locale = apply_filters( 'plugin_locale', get_locale(), 'wp-svg-helpers' ); 63 | load_textdomain( 'wp-svg-helpers', WP_LANG_DIR . '/wp-svg-helpers/wp-svg-helpers-' . $locale . '.mo' ); 64 | load_plugin_textdomain( 'wp-svg-helpers', false, plugin_basename( WP_SVG_HELPERS_PATH ) . '/languages/' ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /includes/Settings.php: -------------------------------------------------------------------------------- 1 | 57 |

58 | 70 | 71 | 72 |

73 | 74 | \n" 10 | "Last-Translator: Allen Moore \n" 11 | "Report-Msgid-Bugs-To: https://github.com/allenmoore/wp-svg-helpers/issues\n" 12 | "X-Poedit-Basepath: ..\n" 13 | "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" 14 | "X-Poedit-SearchPath-0: .\n" 15 | "X-Poedit-SearchPathExcluded-0: *.js\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 18 | 19 | #: includes/Settings.php:57 20 | msgid "Settings for the SVG Helpers." 21 | msgstr "" 22 | 23 | #: includes/Settings.php:72 24 | msgid "The path to the active theme's SVG files. The default location is: " 25 | msgstr "" 26 | 27 | #: includes/Settings.php:72 28 | msgid "assets/svg/dist/" 29 | msgstr "" 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wp-svg-helpers", 3 | "title": "WP SVG Helpers", 4 | "description": "WP SVG Helpers makes it easy to inline SVG files into any WordPress project.", 5 | "version": "1.0.3", 6 | "homepage": "https://github.com/allenmoore/wp-svg-helpers", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/allenmoore/wp-svg-helpers" 10 | }, 11 | "author": { 12 | "name": "Allen Moore", 13 | "email": "am@allenmoore.co", 14 | "url": "https://allenmoore.co" 15 | }, 16 | "keywords": [], 17 | "devDependencies": { 18 | "@babel/core": "^7.5.5", 19 | "@babel/plugin-proposal-class-properties": "^7.5.5", 20 | "@babel/preset-env": "^7.5.5", 21 | "@babel/register": "^7.5.5", 22 | "caniuse-lite": "^1.0.30000986", 23 | "chalk": "^2.4.2", 24 | "del": "^5.0.0", 25 | "eslint": "^6.1.0", 26 | "eslint-plugin-import": "^2.18.2", 27 | "eslint-plugin-node": "^9.1.0", 28 | "eslint-plugin-promise": "^4.2.1", 29 | "eslint-plugin-standard": "^4.0.0", 30 | "gulp": "^4.0.2", 31 | "gulp-babel": "^8.0.0", 32 | "gulp-cssnano": "^2.1.3", 33 | "gulp-filter": "^6.0.0", 34 | "gulp-image": "^5.1.0", 35 | "gulp-notify": "^3.2.0", 36 | "gulp-postcss": "^8.0.0", 37 | "gulp-release-it": "^2.0.16", 38 | "gulp-rename": "^1.4.0", 39 | "gulp-sort": "^2.0.0", 40 | "gulp-sourcemaps": "^2.6.5", 41 | "gulp-wp-pot": "^2.3.5", 42 | "gulplog": "^1.0.0", 43 | "pixrem": "^5.0.0", 44 | "postcss-color-rgba-fallback": "^3.0.0", 45 | "postcss-import": "^12.0.1", 46 | "postcss-preset-env": "^6.7.0", 47 | "require-dir": "^1.2.0", 48 | "semver": "^6.3.0", 49 | "stylelint": "^10.1.0", 50 | "stylelint-config-allenmoore": "^1.2.0", 51 | "stylelint-no-unsupported-browser-features": "^3.0.2", 52 | "vinyl-buffer": "^1.0.1", 53 | "vinyl-source-stream": "^2.0.0" 54 | } 55 | } -------------------------------------------------------------------------------- /wp-svg-helpers.php: -------------------------------------------------------------------------------- 1 |