readme.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. === Simple Custom CSS and JS ===
  2. Created: 06/12/2015
  3. Contributors: diana_burduja
  4. Email: diana@burduja.eu
  5. 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
  6. Requires at least: 3.0.1
  7. Tested up to: 5.3
  8. Stable tag: 3.28
  9. License: GPLv3
  10. License URI: http://www.gnu.org/licenses/gpl-3.0.html
  11. Requires PHP: 5.2.4
  12. Easily add Custom CSS or JS to your website with an awesome editor.
  13. == Description ==
  14. 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.
  15. = Features =
  16. * **Text editor** with syntax highlighting
  17. * Print the code **inline** or included into an **external file**
  18. * Print the code in the **header** or the **footer**
  19. * Add CSS or JS to the **frontend** or the **admin side**
  20. * Add as many codes as you want
  21. * Keep your changes also when you change the theme
  22. == Installation ==
  23. * From the WP admin panel, click "Plugins" -> "Add new".
  24. * In the browser input box, type "Simple Custom CSS and JS".
  25. * Select the "Simple Custom CSS and JS" plugin and click "Install".
  26. * Activate the plugin.
  27. OR...
  28. * Download the plugin from this page.
  29. * Save the .zip file to a location on your computer.
  30. * Open the WP admin panel, and click "Plugins" -> "Add new".
  31. * Click "upload".. then browse to the .zip file downloaded from this page.
  32. * Click "Install".. and then "Activate plugin".
  33. OR...
  34. * Download the plugin from this page.
  35. * Extract the .zip file to a location on your computer.
  36. * Use either FTP or your hosts cPanel to gain access to your website file directories.
  37. * Browse to the `wp-content/plugins` directory.
  38. * Upload the extracted `custom-css-js` folder to this directory location.
  39. * Open the WP admin panel.. click the "Plugins" page.. and click "Activate" under the newly added "Simple Custom CSS and JS" plugin.
  40. == Frequently Asked Questions ==
  41. = What if I want to add multiple external CSS codes? =
  42. 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
  43. = Will this plugin affect the loading time? =
  44. When you click the `Save` button the codes will be cached in files, so there are no tedious database queries.
  45. = Does the plugin modify the code I write in the editor? =
  46. 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.
  47. = My code doesn't show on the website =
  48. Try one of the following:
  49. 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.
  50. 2. Make sure the code is in **Published** state (not **Draft** or **in Trash**).
  51. 3. Check if the `wp-content/uploads/custom-css-js` folder exists and is writable
  52. = Does it work with a Multisite Network? =
  53. Yes.
  54. = What if I change the theme? =
  55. 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.
  56. = Can I use a CSS preprocesor like LESS or Sass? =
  57. For the moment only plain CSS is supported, but you can check out the [Pro version](https://www.silkypress.com/simple-custom-css-js-pro/?utm_source=wordpress&utm_campaign=ccj_free&utm_medium=banner) in case you need a CSS preprocessor.
  58. = Can I upload images for use with my CSS? =
  59. 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:
  60. `div#content {
  61. background-image: url('http://example.com/wp-content/uploads/2015/12/image.jpg');
  62. }`
  63. = Can I use CSS rules like @import and @font-face? =
  64. Yes.
  65. = Who can publish/edit/delete Custom Codes? =
  66. By default only the Administrator will be able to publish/edit/delete Custom Codes. On the plugin activation there is a role created called Web Designer. You can assign this role to a non-admin user in order to allow to publish/edit/delete Custom Codes. On the plugin's Settings page there is an option to remove this role.
  67. = Compatibility with qTranslate X plugin =
  68. * 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.
  69. = My website has HTTPS urls, but the codes are linked as HTTP =
  70. The URL for the linked Codes is built just like the URL for other media (from Media Library) by using the WordPress Address option found on the WP Admin -> Settings -> General page, as shown in [this screenshot](https://www.silkypress.com/wp-content/uploads/2016/12/ccj-siteurl.png). If the WordPress Address has HTTPS in the url, then the Custom Codes and all the other media will have HTTPS in the url.
  71. == Screenshots ==
  72. 1. Manage Custom Codes
  73. 2. Add/Edit Javascript
  74. 3. Add/Edit CSS
  75. $. Add/Edit HTML
  76. == Changelog ==
  77. = 3.28 =
  78. * 11/05/2019
  79. * Tweak: update the Bootstrap and jQuery library links
  80. * Declare compatibility with WordPress 5.3
  81. = 3.27 =
  82. * 08/08/2019
  83. * Compatibility with the "CMSMasters Content Composer" plugin
  84. * Feature: keep the cursor position after saving
  85. * Option: remove the comments from the HTML
  86. = 3.26 =
  87. * 05/08/2019
  88. * Fix: remove the Codemirror library added from WP Core
  89. * Tweak: use protocol relative urls for custom code linked file
  90. * Declare compatibility with WordPress 5.2
  91. = 3.25 =
  92. * 04/21/2019
  93. * Tweak: update the Bootstrap and jQuery library links
  94. * Declare compatibility with WooCommerce 3.6
  95. = 3.24 =
  96. * 04/05/2019
  97. * Fix: remove the editor scrollbar
  98. * Tweak: rename "First Page" to "Homepage" to avoid misunderstandings
  99. = 3.23 =
  100. * 03/15/2019
  101. * Fix: avoid conflicts with other plugins that use CodeMirror as their editor
  102. = 3.22 =
  103. * 12/06/2018
  104. * Fix: another solution for the bug related to the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
  105. = 3.21 =
  106. * 12/06/2018
  107. * Fix: the Edit Custom Code page was blank for WordPress 5.0 and the Classic Editor enabled
  108. = 3.20 =
  109. * 11/15/2018
  110. * Fix: remove compatibility with the Shortcoder plugin. Bug https://wordpress.org/support/topic/edit-page-blank-8/
  111. * Declare compatibility WooCommerce 3.5
  112. = 3.19 =
  113. * 10/16/2018
  114. * Fix: keep the editor LTR even on RTL websites
  115. * Fix: flush rewrite rules after modifying the "Add Web Designer role" option
  116. = 3.18 =
  117. * 07/13/2018
  118. * Fix: the default comment for JS for other locales than "en_" was removing the <scripts> tags
  119. * Tweak: make the search dialog persistent
  120. * Tweak: correct the tooltip info for the 'ccs_js_designer' option
  121. = 3.17 =
  122. * 04/25/2018
  123. * Fix: add the add/edit/delete custom post capabilities to the admin and 'css_js_designer' roles on plugin activation
  124. = 3.16 =
  125. * 04/22/2018
  126. * Fix: "The link you followed has expired" on custom code save if the WP Quads Pro plugin is active
  127. * Fix: PHP warning for PHP 7.2
  128. * Change: add/remove the "Web Designer" role only on activating/deactivating the option in the Settings page
  129. = 3.15 =
  130. * 03/27/2018
  131. * Change: check the option name against an array of allowed values
  132. = 3.14 =
  133. * 02/04/2018
  134. * Feature: permalink slug for custom codes
  135. * Fix: set the footer scripts to a higher priority
  136. * Update the french translation
  137. * Fix: allow admin stylesheets from ACF plugin, otherwise it breaks the post.php page
  138. * Tweak: for post.php and post-new.php page show code's title in the page title
  139. = 3.13 =
  140. * 01/12/2018
  141. * Feature: add the "Keep the HTML entities, don't convert to its character" option
  142. = 3.12 =
  143. * 01/03/2018
  144. * Reverse to the `wp_footer` function for the footer scripts, as the `print_footer_scripts` function is used also in the admin, which lead to many broken back-ends
  145. = 3.11 =
  146. * 01/03/2018
  147. * Use the `print_footer_scripts` function for the footer scripts (https://wordpress.org/support/topic/footer-code-position-before-external-scripts-is-overridden/)
  148. * Escape selectively the HTML characters in the editor (https://wordpress.org/support/topic/annoying-bug-in-text-editor/)
  149. = 3.10 =
  150. * 12/15/2017
  151. * Fix: https://wordpress.org/support/topic/broken-layout-of-code-snippet-type-color-tag-css-html-js-on-main-list-table/
  152. * Feature: add filter by code type
  153. * Feature: make the 'Modified' column sortable
  154. * Fix: if the default comment remains in the "Add Custom JS", then there was no <script> tags added to the code, as the comment contained a <script> tag
  155. = 3.9 =
  156. * 12/01/2017
  157. * Feature: add "Last edited ..." information under the editor
  158. * Fix: jump to line when searching
  159. * Tweak: add message that the Code Revision data is dummy
  160. = 3.8 =
  161. * 10/19/2017
  162. * Declare compatibility with WooCommerce 3.2 (https://woocommerce.wordpress.com/2017/08/28/new-version-check-in-woocommerce-3-2/)
  163. * Fix: avoid conflicts with other plugins that implement the CodeMirror editor
  164. * Update the CodeMirror library to 5.28 version
  165. = 3.7 =
  166. * 10/06/2017
  167. * Add French and Polish translation
  168. = 3.6 =
  169. * 09/07/2017
  170. * Fix: compatibility with the CSS Plus plugin
  171. = 3.5 =
  172. * 08/25/2017
  173. * Code refactoring
  174. * Add activate/deactivate link to row actions and in Publish box
  175. * Make the activate/deactivate links work with AJAX
  176. * Add Turkish translation
  177. = 3.4 =
  178. * 07/11/2017
  179. * Security fix according to VN: JVN#31459091 / TN: JPCERT#91837758
  180. = 3.3 =
  181. * 06/23/2017
  182. * Feature: option for adding Codes to the Login Page
  183. = 3.2 =
  184. * 06/13/2017
  185. * Fix: compatibility issue with the HTML Editor Syntax Highlighter plugin
  186. = 3.1 =
  187. * 05/14/2017
  188. * Feature: prepare the plugin for translation
  189. = 3.0 =
  190. * 04/12/2017
  191. * Feature: create the Web Designer role
  192. * Feature: allow Custom Codes to be managed only by users with the right capabilities
  193. = 2.10 =
  194. * 02/05/2017
  195. * Feature: circumvent external file caching by adding a GET parameter
  196. * Add special offer for Simple Custom CSS and JS pro
  197. = 2.9 =
  198. * 12/05/2016
  199. * Compatibility with WP4.7. The "custom HTML code" was not showing up anymore
  200. = 2.8 =
  201. * 10/09/2016
  202. * Feature: add search within the editor accessible with Ctrl+F
  203. * Feature: make the inactive rows opaque
  204. = 2.7 =
  205. * 09/04/2016
  206. * Fix: there was a space in the htmlmixed.%20js url
  207. * Feature: make the editor resizable
  208. = 2.6 =
  209. * 08/31/2016
  210. * Feature: add HTML code
  211. * Fix: add htmlentities when showing them in the editor
  212. * Feature: when adding a code, show more explanations as comments
  213. = 2.5 =
  214. * 08/25/2016
  215. * Fix: compatibility with other plugins that interfere with the CodeMirror editor
  216. = 2.4 =
  217. * 08/01/2016
  218. * Add the "Add CSS Code" and "Add JS Code" buttons next to the page title
  219. * Compatibility with WP 4.6: the "Modified" column in the Codes listing was empty
  220. = 2.3 =
  221. * 06/22/2016
  222. * Add the includes/admin-notices.php and includes/admin-addons.php
  223. * Feature: change the editor's scrollbar so it can be caught with the mouse
  224. = 2.2 =
  225. * 06/22/2016
  226. * Check compatibility WordPress 4.5.3
  227. * Add special offer for Simple Custom CSS and JS pro
  228. = 2.1 =
  229. * 04/24/2016
  230. * Fix: on multisite installs have to create the custom-css-js folder in the upload dir for each site
  231. * Fix: the `deactivate code` star wasn't working when first time clicked
  232. * Fix: In the add/edit Code page filter which meta boxes are allowed
  233. * Fix: If the custom-css-js folder is not created of is not writable, issue an admin notice.
  234. = 2.0 =
  235. * 04/11/2016
  236. * Feature: enable/disable codes
  237. * Feature: add a GET parameter at the end of external files in order to over circumvent caching
  238. * Fix: don't add the "<script>" tag from the code if already present.
  239. = 1.6 =
  240. * 03/26/2016
  241. * Fix: the number of codes were limited because query_posts is automatically inserting a limit
  242. = 1.5 =
  243. * 03/10/2016
  244. * Fix: solved a conflict with the `shortcoder` plugin.
  245. = 1.4 =
  246. * 01/04/2016
  247. * Tweak: Do not enqueue scripts unless we are editing the a custom-css-js type post.
  248. * Fix: The register_activation_hook was throwing a notice
  249. * Fix: add window.onload when initializing the CodeMirror editor
  250. * Tweak: Differentiated the option names for "Where on page" and "Where in site"
  251. * Fix: set the correct language modes to CodeMirror object
  252. * Tweak: remove the `slug` metabox
  253. * Tweak: use the compressed version of CodeMirror
  254. = 1.3 =
  255. * 12/27/2015
  256. * Tweak: changed the submenus to "Add Custom CSS" and "Add Custom JS" instead of "New Custom Code"
  257. * Tweak: Use `admin_head` instead of `admin_enqueue_scripts` for external files in order to add priority to the code
  258. * Fix: The javascript code was not shown
  259. * Fix: For longer code the last line in the editor was hidding because of the CodeMirrorBefore div.
  260. = 1.2 =
  261. * 12/14/2015
  262. * Fix: when a code was sent into Trash it still wasn't shown on the website
  263. = 1.1 =
  264. * 10/12/2015
  265. * Tweak: for external files use wp_head and wp_footer instead of wp_enqueue_style. Otherwise the CSS and JS is inserted before all the other scripts and are overwritten.
  266. * Tweak: Save all the codes in files in order to save on database queries
  267. * Tweak: Rewrite the readme.txt in the form of FAQ for better explanations
  268. = 1.0 =
  269. * 06/12/2015
  270. * Initial commit
  271. == Upgrade Notice ==
  272. Nothing at the moment