=== CSS & JavaScript Toolbox === Contributors: wipeoutmedia Author URL: https://css-javascript-toolbox.com Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EWDWF75JHT9Q6 Tags: snippets, javascript, php, scripts, code License: GPLv2 or later License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html Requires at least: 5.0 or higher Requires PHP: 7.4.0 Tested up to: 6.8 Stable tag: 12.0.6 Add CSS, JavaScript, PHP and HTML code snippets to your site. For AI-powered snippets, get our free plugin here: wpsnippets.ai == Description == Safely add CSS, JavaScript, PHP or HTML to unique code blocks, then choose where it goes on your site. For even more power, get our free AI-powered snippet plugin here: [WP Snippets AI](https://wpsnippets.ai/?utm_source=cjt_free_on_wordpress&utm_medium=readme_txt_description&utm_campaign=click_for_premium_link) ### IDEAL FOR: ### * **Making CSS front-end changes** - No need to modify theme files or work with tedious built-in theme options. Just create a CSS code block. * **Adding site functionality** - Stop adding plugins for simple tasks as they can slow down your site. Create a JavaScript or PHP code block instead. * **Adding widgets, code snippets and third-party scripts** - Code blocks are perfect for adding scripts such as Google Analytics and chat widgets to your website. CJT is built on the concept of a code block. Each code block is more than just a code editor. It also contains a location editor so you can click the sections of your website you want your code to run. It was designed for super-fast development without any cumbersome page refreshing. Create as many code blocks as you need and see all of your code and locations in the one dashboard. Don't worry, CJT has been optimised to handle 100's of code blocks and thousands of locations (i.e. Pages, Posts, Categories, Custom Posts, etc). [Click for CSS & JavaScript Toolbox PLUS](https://css-javascript-toolbox.com/?utm_source=cjt_free_on_wordpress&utm_medium=readme_txt_description&utm_campaign=click_for_premium_link) ### FEATURES: ### * Easy to use 'code blocks' interface * Powerful code editor * Intuitive assignment panel (click where your code goes) * Code/script library management * Add code to the header or footer hook * **PREMIUM** Add code to entire website, all posts, etc * **PREMIUM** Add code via shortcodes, widgets, Gutenburg blocks, etc * **PREMIUM** Add code via tags, URLs, regular expressions * **PREMIUM** 8 additional hooks for more precise assignments * **PREMIUM** Invert feature (run code everywhere but ...) * **PREMIUM** Editor tools (code auto complete, beautify/minify, etc) * **PREMIUM** Code revisions system * **PREMIUM** Backup and export/import system [Click for CSS & JavaScript Toolbox PLUS](https://css-javascript-toolbox.com/?utm_source=cjt_free_on_wordpress&utm_medium=readme_txt_description&utm_campaign=click_for_premium_link) ### OVERVIEW VIDEO ### https://www.youtube.com/watch?v=vYAKePVgJqE == Installation == 1. If you're upgrading from older versions its highly recommended to backup your database before upgrading. 2. Upload the 'css-javascript-toolbox' folder to the '/wp-content/plugins/' directory 3. Activate the plugin through the 'Plugins' menu in WordPress 4. Click 'CSS & JavaScript Toolbox' link in the main navigation (left side of your Dashboard). == Screenshots == 1. Code Block Editor 2. Code Block Assignment Panel 3. CJT Main Admin Toolbar 4. Code Block Toolbar 5. Code Block Editor Tools 6. Assignment Panel for Pages 7. Assignment Panel for Posts 8. Assignment Panel for Categories 9. Assignment Panel for Custom Posts 10. Assignment Panel for Auxiliary Assignments 11. Assignment Panel for Tags 12. Assignment Panel for Advanced Assignments 13. Assignment Panel Inverter 14. Code Block Information == Frequently Asked Questions == = Why was the CJT plugin developed and what is it used for? = The CJT plugin was created to help website authors write or add their own code. The plugin allows you to contribute to your Wordpress installation code via a simple web interface, where you can modify and extend the functionality and appearance of your website by writing code directly into CJT code blocks. Some typical examples can include changing the look of a specific page by adding some CSS code; adding functionality to a page with PHP; or making a page more interactive by adding some JavaScript. = What is a CJT 'code block'? = The CJT code block is the most fundamental unit for writing code and to associate it with specific Wordpress requests via the assignment panel. = What is the assignment panel? = The assignment panel is a tabs window, which appears on the right side of the code block editor and is used to assign/apply the code block into specific requests. These assignments include: Pages, Posts, Custom Posts, Tags, and Categories. Auxiliary sections such as Entire Website, Website Backend, All Pages, All Posts, Recent Posts, Blog Index, All Categories, Search Pages, All Archives, Tag Archives, Author Archives, Attachment Pages, 404 Error Pages. Advanced sections such as URLs, or Regular Expressions (Regex). = I have noticed a bunch of question marks appear during mouse hover - what are they? = These are premium features, which are only available for our CJT PLUS plugin. [Click here to purchase a license for any of our premium CJT PLUS products](https://css-javascript-toolbox.com/pricing). = Can you select more than one item from the assignment panel? = Yes. You can select any number of items you need, there is no limitation regarding this. = Can you assign multiple blocks to the same items from the assignment panel? = Yes. It's one of the most useful features that CJT supports as it allows you to manage/split your codes into several code blocks, allowing you to override code in a former (or lower-ordered) code block. = What is Pages, Posts, Categories and Custom Posts tabs? = These lists with checkboxes represent all of your WordPress Pages, Posts, Categories and Custom Posts that your entire website contains. It also supports sub-pages and sub-categories, which you will find in there. = What is the Auxiliary tab? = As there are a number of requests that are not available as normal Wordpress items (e.g. Pages, Posts, etc) but since it's commonly required and most likely to be used, you will find them pre-defined in the Auxiliary tab. In the Auxiliary tab you can find things like: Entire Website, Blog Index, Author, 404 error, Front-end, Admin backend and much more! = Is it better to use the URLs tab, or select items if found through other tabs? = Pages, Posts, Custom Posts and Categories tabs are created to simplify the assignment process for all types of users. Using URLs is great for fast performance as it requires less time to evaluate/identify the request! However, not all things can be done through the URLs tab. For example, applying a single block to a Category index page and all its sub-categories. = What is the Advanced Expressions tab? = The Advanced Expression tab allows you to fully control what requests to integrate into the code block by using Regular Expressions. In other words, allowing CJT users to define more requests to assign the code block to. = Can I move the blocks around? = Yes by hovering your mouse cursor over the code block title bar until it turns into a four-sided arrow, this allow you to move the blocks. Clicking the block title bar allows you to open and close the blocks. = Is a code block saved after I click 'Create' in 'Create New Code Block' form? = Yes. The block is created and saved in your database. In order to discard the block, you have to delete it, then click the 'Save All Changes' button. = After shuffling the order of the code blocks using drag-and-drop, is the new code block order immediately saved? = No. In order to save the code blocks order, you need to click the 'Save All Changes' button. = Is a code block permanently deleted from the blocks list page after a code block delete icon is clicked? = No. After you delete a code block, you then need to click the 'Save All Changes' button. = I'm using the URLs tab and my code is not working? = Make sure you have copied and pasted the Page, Post, or Category URL exactly as it appears in the browser address bar. For example, you may have inadvertently included an extra forward slash at the end of your URL. = Why use the Hook switch in the code block bar? = The hook location feature gives you further control over the outputting of your CSS and JavaScript code. This is useful in case overriding another plugins' CSS code is required. Also, it's sometimes better to put your JavaScript code in the footer to avoid slowing down your page load. = I received a weird error, what do I do now? = Due to the overwhelming amount of emails we get for users requesting support for our CJT plugins, we cannot provide support for the CJT Free plugin (hosted here on WordPress.org) at this stage unfortunately. If you wish to receive priority support, please visit our CJT website and then [purchase a license for any of our premium CJT PLUS products](https://css-javascript-toolbox.com/pricing). == Changelog == = 12.0.6 = * Security: Fixed sanitization vulnerability in Template Manager * Security: Fixed sanitization vulnerability in Blocks Coupling controller * Enhancement: Improved plugin security and stability = 12.0.5 = * Fixed: Improved plugin security and stability = 12.0.4 = * Fixed: Improved plugin security and stability = 12.0.3 = * Security: Fixed path traversal vulnerability in controller routing * Security: Added input validation to prevent arbitrary file inclusion * Enhancement: Improved plugin security and stability = 12.0.2 = * Fix: Text domain header issue * Fix: Old PHP notices and warnings * Enhancement: Improved plugin stability = 12.0.1 = * Fix: Headers already sent issue * Fix: Old PHP notices and warnings * Enhancement: Improved plugin stability = 12.0 = * Compatibility: with latest WordPress version * Enhancement: Improved plugin stability * Update: ACE editor to version 1.35.3 * Fix: Resolved main controller dirname null string issue * Fix: Compatibility issues with PHP > 8.0 * Fix: Notice warning errors in WordPress dashboard area * Fix: Various bugs fixed = 11.9.1 = * Fix: Various bugs fixed * Enhancement: Improved plugin stability = 11.9 = * Fix: XSS vulnerability in shortcodes and code blocks * Fix: Bugs fixed = 11.8 = * Fix: XSS vulnerability * Fix: Bugs fixed = 11.7 = * Fix: PHP version 8 fatal issue * Fix: Updated old composer logic, updated file require path, and some other minor formatting * Fix: PHP version 8+ issue where Block ID Info panel and Assignment Info panel does not show = 11.6 = * Enhancement: Updated ACE Editor to v1.15.0 * Fix: Bugs fixed = 11.5 = * Compatibility: PHP version 8+ * Compatibility: MySQL version 8+ * Fix: Duplicate ID issue, which on rare occasions was fetching the 'revision block' ID for a newly created block causing an error for duplicate entry * Enhancement: If the 'wp-content' directory is renamed to something different (e.g. 'content'), CJT will now find any custom content directories and install correctly = 11.4 = * Removed: Auxiliary and Advanced tabs are removed for CJT new installs. Existing CJT users with active code blocks still get them * Enhancement: All mouse hover-over popups are faster and more responsive = 11.3 = * Fix: URL Assignment tab is now working as expected * Fix: Inverter functionality was not being displayed in the frontend = 11.2 = * Added: New links for CJT PLUS license validation = 11.0 = * Added: 8 More Hooks (Body Open, Before Post Content, After Post Content, Before Post, Excerpt, After Post Excerpt, Before Posts List, After Posts List, Before Post * Enhancement: Assignments Panel * Enhancement: Templates Panel * Enhancement: Code Files Panel * Enhancement: Revisions Panel * Enhancement: Code Block Toolbar * Enhancement: Code Block InfoBar (added Shortcode copy feature) * Enhancement: Group Font Size Buttons * Enable/Disable: Toolbox menu when block is saved * Fix: Framework incompatibility version * Fix: Metabox Block InfoBar elements * Fix: Minifier was not working * Moved: Code Block Toolbar buttons * Moved: Code Block Toolbar editor menu (i.e. File, Edit, Settings) to Editor Toolbar as buttons * Removed: Clear Block (clears all Code Block code) Editor Toolbar button * Removed: Footer/Header All batch buttons * Show: Incompatible Hooks "Warning" Notice = 10.0 = * Fix: Styling fixes for WordPress version 5.5 * Enhancement: Updated ACE Editor to v1.4.12 * Enhancement: Improve snippet manager * Enhancement: Add placeholder option * Added: Option to disable auto-indent * Added: New language modes * Fix: Double space being converted to dot on mobile keyboards * Fix: Backspace not working with some mobile keyboards = 9.4 = * Improved variable security throughout the plugin. * Fix: Bugs fixed. * Fix: PHP notices and warnings fixed. = 9.3 = * Fix: SQL vulnerability for uninstaller. = 9.2 = * Added: Editor status bar to quickly display info regarding the block. * Enhancement: Updated ACE editor to v1.4.5 * Enhancement: Detailed data about the assignment of the block in the info popup. = 9.0 = * PHP 7.2+ fixes * Sanitisation on GET functions = 8.4.2 = * Fix: Wordpress Vulnerability report = 8.4.1 = * Fix: CSS & JavaScript Toolbox not showing = 8.4 = * Enhancement: START and END comments for CJT Assignments, CJT Shortcodes, and CJT Metabox code blocks. You can now go into the Page Source and perform a search for these comments to quickly find your code block within the source code. * Removed: Admin notice “CJT plugin is no longer supported" = 8.3.2 = * Added: Admin notice “CJT plugin is no longer supported" = 8.3.1 = * Fix: Development log files created at production = 8.3 = * Added: “CJT Plugin will not work” admin notice displayed when PHP version < 5.3 * Enhancement: Dashboard statistics Metabox display more fields * Fix: WordPress Plugin compatibility for commonly detected conflicts * Fix: SQL errors commonly appears in Error log file * Fix: Dashboard statistics Metabox exception when CJT server is not reachable * Fix: Dashboard statistics Metabox blocks count include backups block * Updated: ACE Editor updated to the last version = 8.2 = * Added: PHP version check on activation Fix: Fatal error: 'break' not in the 'loop' or 'switch' context in /path/to/wp-content/plugins/css-javascript-toolbox/controllers/block.php on line 145 * Added: Display notice during installation steps on network-level errors. Resolves endless spinner issue * Compatibility: 100% compatible with BulletProof Security (BPS) security plugin. No need for any bypass rules = 8.1 = * Compatibility: Fully tested with Wordpress 4.3.1 * Enhancement: CJT core upgrades and enhancements = 8.0.4 = * Compatibility: Fully tested with Wordpress 4.3 * Added: List of future deprecated features = 8.0.3 = * Added: Support us link on Dashboard Metabox * Added: Support us link on CJT Header = 8.0.2 = * Removed: CJT License Setup form. CJT is now 100% Free * Fix: Multi-site CJT Network extensions not loading = 8.0.1 = * Fix: Fresh installer stopping when “Adding Wordpress built-in scripts and styles as CJT Templates” * Added: Dashboard Metabox notices when CJT is not yet installed = 8.0 = * Added: Show premium extensions list in Dashboard Widget instead of Scripts Packages * Enhancement: Framework update to make CJT functionality more extendable * Removed: Code Editor Toolbar buttons and code block ‘File', ‘Edit’ and ‘View’ menu are moved to separate extensions * Removed: Editor Themes switcher list are moved to separate extension * Removed: Import and Export Tools are moved to separate extension * Fix: Conflict with other popular themes like X Theme = 7.2 = * Fix: Block Code file name moving away when open/close Block metabox * Fix: Shortcode list is too small for Shortcode names * Updated: CJT Framework for packages and extensions updates = 7.1.2 = * Added: Show Latest News on Dashboard Widget = 7.1.1 = * Added: Add Statistics Dashboard Widget that shows few useful fields. = 7.1 = * Performance: Processing and Memory optimisation for better performance. * Enhancement: Block Box Themes Support. * Enhancement: 32 Themes is now supported to be applied for the whole block box. * Enhancement: Applying theme per browser. Allow for assigning appropriate theme for different devices. * Enhancement: Assigned/All mode switchers for assignment panel list. You can show all items even not selected ones or show only assigned to the block. * Enhancement: Bullet-Proof Assignment Panel layout so it would always reserved even if another Plugin wrongly load jQuery TABS/ACCORDION Styles. * UI & Graphics: General UI enhancements. * Updated: Code editor updates. * Enhancement: Turns CJT Block into a tiny Project that host Multiple "Managed" Code-Files instead of just one. * Enhancement: No need to create a Block for each Language Type and assign them to the same Wordpress Page. One Block with Multiple Code Files solved that by creating only one Block for each assigned request. * Enhancement: Code Files Support Language Type, Code, Description and TAG fields. * Enhancement: Write Design-Time Organised Code by separating them into code-files (JS, CSS, PHP, HTML) and CJT will merge them all at run-time. * Enhancement: There is no need to write