'id' => 'sidebar-footer-copyright'
] + $config);
});
+
+
+/**
+ * Add Custom Styles to TinyMCE editor
+ */
+// https://codex.wordpress.org/TinyMCE_Custom_Styles
+// Callback function to insert 'styleselect' into the $buttons array
+add_filter( 'mce_buttons_2', function($buttons) {
+ array_unshift( $buttons, 'styleselect' );
+ return $buttons;
+});
+
+// Add format classes to
+add_filter( 'tiny_mce_before_init', function($init_array) {
+ $sizes = [
+ 'xs',
+ 'sm',
+ 'lg',
+ 'xl',
+ ];
+
+ // Text size styles
+ foreach ($sizes as $size) {
+ $style_formats[] = [
+ 'title' => 'Text '. strtoupper($size),
+ 'inline' => 'span',
+ 'selector' => 'h1, h2, h3, h4, h5, p, div',
+ 'classes' => 'text-'. $size,
+ 'wrapper' => false,
+ ];
+ }
+
+ // Insert the array, JSON ENCODED, into 'style_formats'
+ $init_array['style_formats'] = json_encode( $style_formats );
+
+ return $init_array;
+});
"mix-tailwindcss": "^1.0.2",
"mmenu-light": "^2.3.1",
"npm-run-all": "^4.1",
- "purgecss-with-wordpress": "knowler/purgecss-with-wordpress#more-wp-generated-classes",
+ "purgecss-with-wordpress": "^1.1.0",
"rimraf": "^2.6",
"rupture": "^0.7.1",
"stylelint": "^10.1",
purgecss "^1.3.0"
webpack-sources "^1.3.0"
-purgecss-with-wordpress@knowler/purgecss-with-wordpress#more-wp-generated-classes:
- version "1.0.0"
- resolved "https://codeload.github.com/knowler/purgecss-with-wordpress/tar.gz/0838cc9c88d83f0cc1c0f2e61cef43a0242c2392"
+purgecss-with-wordpress@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/purgecss-with-wordpress/-/purgecss-with-wordpress-1.1.0.tgz#ceeef62f9e092fef1c2f4748a447cbf6b790382a"
+ integrity sha512-7hlRdGToDyyh+GF/At1GNB07viUG+dppvdq34H7DUm8ySgp4OULPr58R2Ww8/Fe5nOsCQ6YihTDjFHFlSwwCsQ==
purgecss@^1.3.0:
version "1.3.0"