=== Simple Custom CSS and JS PRO === Created: 06/12/2015 Contributors: diana_burduja Email: diana@burduja.eu Tags: CSS, JS, javascript, custom CSS, custom JS, custom style, site css, add style, customize theme, custom code, external css, css3, style, styles, stylesheet, theme, editor, design, admin Requires at least: 3.0.1 Tested up to: 5.6 Stable tag: 4.21.4 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html Requires PHP: 5.2.4 Easily add Custom CSS or JS to your website with an awesome editor. == Description == Customize your WordPress site's appearance by easily adding custom CSS and JS code without even having to modify your theme or plugin files. This is perfect for adding custom CSS tweaks to your site. = Features = * **Text editor** with syntax highlighting * Print the code **inline** or included into an **external file** * Print the code in the **header** or the **footer** * Add CSS or JS to the **frontend** or the **admin side** * Add as many codes as you want * Keep your changes also when you change the theme = Frequently Asked Questions = * **Can I recover the codes if I previous uninstalled the plugin?** No, on the `Custom CSS and JS` plugin's uninstall all the added code will be removed. Before uninstalling make sure you don't need the codes anymore. * **What if I want to add multiple external CSS codes?** If you write multiple codes of the same type (for example: two external CSS codes), then all of them will be printed one after another * **Will this plugin affect the loading time?** When you click the `Save` button the codes will be cached in files, so there are no tedious database queries. * **Does the plugin modify the code I write in the editor?** No, the code is printed exactly as in the editor. It is not modified/checked/validated in any way. You take the full responsability for what is written in there. * **My code doesn't show on the website** Try one of the following: 1. If you are using any caching plugin (like "W3 Total Cache" or "WP Fastest Cache"), then don't forget to delete the cache before seing the code printed on the website. 2. Make sure the code is in **Published** state (not **Draft** or **in Trash**). 3. Check if the `wp-content/uploads/custom-css-js` folder exists and is writable * **Does it work with a Multisite Network?** Yes. * **What if I change the theme?** The CSS and JS are independent of the theme and they will persist through a theme change. This is particularly useful if you apply CSS and JS for modifying a plugin's output. * **Can I use a CSS preprocesor like LESS or Sass?** No, for the moment only plain CSS is supported. * **Can I upload images for use with my CSS?** Yes. You can upload an image to your Media Library, then refer to it by its direct URL from within the CSS stylesheet. For example: `div#content { background-image: url('http://example.com/wp-content/uploads/2015/12/image.jpg'); }` * **Can I use CSS rules like @import and @font-face?** Yes. * **CSS Help.** If you are just starting with CSS, then here you'll find some resources: * [codecademy.com - Learn HTML & CSS](https://www.codecademy.com/learn/web) * [Wordpress.org - Finding Your CSS Styles](https://codex.wordpress.org/Finding_Your_CSS_Styles) == Installation == * From the WP admin panel, click "Plugins" -> "Add new". * In the browser input box, type "Simple Custom CSS and JS". * Select the "Simple Custom CSS and JS" plugin and click "Install". * Activate the plugin. OR... * Download the plugin from this page. * Save the .zip file to a location on your computer. * Open the WP admin panel, and click "Plugins" -> "Add new". * Click "upload".. then browse to the .zip file downloaded from this page. * Click "Install".. and then "Activate plugin". OR... * Download the plugin from this page. * Extract the .zip file to a location on your computer. * Use either FTP or your hosts cPanel to gain access to your website file directories. * Browse to the `wp-content/plugins` directory. * Upload the extracted `custom-css-js` folder to this directory location. * Open the WP admin panel.. click the "Plugins" page.. and click "Activate" under the newly added "Simple Custom CSS and JS" plugin. == Frequently Asked Questions == = Small incompatibilities = * If the [qTranslate X](https://wordpress.org/plugins/qtranslate-x/) plugin is adding some `[:]` or `[:en]` characters to your code, then you need to remove the `custom-css-js` post type from the qTranslate settings. Check out [this screenshot](https://www.silkypress.com/wp-content/uploads/2016/08/ccj_qtranslate_compatibility.png) on how to do that. * The [HTML Editor Syntax Highlighter](https://wordpress.org/plugins/html-editor-syntax-highlighter/) plugin will make the Beautify and Fullscreen editor buttons not work properly. == Changelog == = 4.21.4 = * 10/02/2020 * Fix: error when filtering the custom codes * Fix: incompatibility with the Max Mega Menu plugin = 4.21.3 = * 08/20/2020 * Fix: remove the "variable-no-property" and "no-ids" rules from SASS linting * Fix: add "Cmd + " editor shortcuts for MacOS computers * Fix: the user language preferrence was ignored in favor of the site defined language * Fix: allow the jQuery library added by plugins like Enable jQuery Migrate Helper or Test jQuery Updates * Fix: permalink was not editable with WordPress 5.5 = 4.21.2 = * 07/14/2020 * Fix: use file_get_contents instead of include_once to load the custom codes = 4.21 = * 07/08/2020 * Feature: "Ctrl + /" in the editor will comment out the code * Feature: order custom codes table by "type" and "active" state * Fix: shortcodes not working on subsites from multisite installations = 4.20.3 = * 06/06/2020 * Fix: PHP warning if empty string is used in a "URL starts with ..." rule = 4.20.2 = * 05/31/2020 * Fix: compatibility issue with the Product Slider for WooCommerce by ShapedPlugin * Fix: PHP warning in case the $_SERVER['REQUEST_URI'] variable is missing = 4.20.1 = * 05/07/2020 * Fix: HTML code set to "Both" devices doesn't show up on mobile devices * Check and declare compatibility with WC4.1 = 4.20 = * 04/24/2020 * Feature: don't show type attribute for script and style tags if the theme adds html5 support for it * Code refactory * Fix: the permalink was mistakingly showing a ".css" file extension when being edited = 4.19 = * 03/19/2020 * Check and declare compatibility with WC4.0 * Check and declare compatibility with WP5.4 = 4.18 = * 02/02/2020 * Feature: color the matching brackets in the editor * Fix: date Published and Modified date wasn't shown in Japanese = 4.17 = * 12/19/2019 * Fix: codes limited only to homepage were showing on all the pages * Feature: editor autocomplete on keyup * Feature: add "After
tag" option for HTML codes, if the theme allows it = 4.16.1 = * 11/05/2019 * Declare compatibility with WP5.3 and WC3.8 = 4.16 = * 10/23/2019 * Fix: preview wasn't working under certain conditions = 4.15 = * 10/02/2019 * Feature: Linting for SASS code * Feature: permalink slug for custom codes = 4.14 = * 09/08/2019 * Compatibility with the "CMSMasters Content Composer" plugin * Option: remove the comments from the HTML = 4.13 = * 05/08/2019 * Fix: remove the CodeMirror library added from the WP Core * Tweak: use protocol relative urls for custom code linked file * Declare compatibility with WordPress 5.2 = 4.12 = * 04/21/2019 * Tweak: rename "First Page" to "Homepage" to avoid misunderstandings * Add CCJ_WP_CONDITIONALS constant that turns off the WP Conditional Tags from being executed * Fix: update the Bootstrap library used in the admin side to 3.4.1 version = 4.11 = * 03/09/2019 * Fix: avoid conflicts with other plugins that use CodeMirror as their editor = 4.10 = * 12/07/2018 * Fix: the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled = 4.9 = * 09/10/2018 * 10/09/2018 * Feature: add the add/edit/delete custom post capabilities to the admin and 'css_js_designer' roles on plugin activation * Fix: add to the admin the capabilities of the custom-css-js custom post = 4.8 = * 09/04/2018 * Fix: rebuild the custom-css-js-tree when activating the pro version, otherwise some HTML codes don't show up in the frontend * Fix: keep the editor LTR even on RTL websites * Fix: catch the syntax errors from WP Conditional Tags * Fix: on multi-site installations any HTML code from the subsite was replaced with one from the main site = 4.7 = * 07/13/2018 * New: allow importing one custom code from another for Less/SASS CSS codes * Fix: PHP warning at "Apply only on these Pages" if the JSON is not properly formatted * Fix: the default comment for JS for other locales than "en_" was removing the