Version Description
- Enhance: Add Statistics Dashboard Widget that shows few useful fields.
Download this release
Release Info
Developer | xpointer |
Plugin | CSS & JavaScript Toolbox |
Version | 7.1.1 |
Comparing to | |
See all releases |
Code changes from version 7.1 to 7.1.1
- access.points/dashboardmetabox.accesspoint.php +55 -0
- controllers/default.php +11 -1
- css-js-toolbox.class.php +5 -0
- css-js-toolbox.php +2 -2
- models/statistics-metabox.php +108 -0
- readme.txt +24 -120
- views/blocks/manager/public/css/blocks.css +4 -1
- views/blocks/manager/tmpl/blocks.html.tmpl +5 -8
- views/dashboard/metabox/statistics/public/css/default.css +7 -0
- views/dashboard/metabox/statistics/public/js/default/default.js +17 -0
- views/dashboard/metabox/statistics/tmpl/default.html.tmpl +48 -0
- views/dashboard/metabox/statistics/view.php +77 -0
access.points/dashboardmetabox.accesspoint.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Disallow direct access.
|
7 |
+
defined('ABSPATH') or die("Access denied");
|
8 |
+
|
9 |
+
/**
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
class CJTDashboardMetaboxAccessPoint extends CJTAccessPoint {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* put your comment there...
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
public function __construct() {
|
19 |
+
// Initialize Access Point base!
|
20 |
+
parent::__construct();
|
21 |
+
// Set access point name!
|
22 |
+
$this->name = 'dashboard-metabox';
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* put your comment there...
|
27 |
+
*
|
28 |
+
*/
|
29 |
+
public function createMetabox() {
|
30 |
+
wp_add_dashboard_widget('cjt-statistics', cssJSToolbox::getText('CSS & Javascript Toolbox'), array($this, 'route'));
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* put your comment there...
|
35 |
+
*
|
36 |
+
*/
|
37 |
+
protected function doListen() {
|
38 |
+
add_action('wp_dashboard_setup', array(&$this, 'createMetabox'), 10, 0);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* put your comment there...
|
43 |
+
*
|
44 |
+
*/
|
45 |
+
public function route($loadView = false, $request = null) {
|
46 |
+
// Load Auto Upgrade controller!
|
47 |
+
$this->controllerName = 'default';
|
48 |
+
parent::route($loadView, $request)
|
49 |
+
// Set action name to autoUpgrade
|
50 |
+
->setAction('dashboardMetabox')
|
51 |
+
// fire action to enable automatic upgrade!
|
52 |
+
->_doAction();
|
53 |
+
}
|
54 |
+
|
55 |
+
} // End class.
|
controllers/default.php
CHANGED
@@ -13,7 +13,17 @@
|
|
13 |
* @since version 6.0
|
14 |
*/
|
15 |
class CJTDefaultController extends CJTController {
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* put your comment there...
|
19 |
*
|
13 |
* @since version 6.0
|
14 |
*/
|
15 |
class CJTDefaultController extends CJTController {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* put your comment there...
|
19 |
+
*
|
20 |
+
*/
|
21 |
+
public function dashboardMetaboxAction() {
|
22 |
+
// Create View.
|
23 |
+
$view = CJTView::getInstance('dashboard/metabox/statistics');
|
24 |
+
$view->display('default');
|
25 |
+
}
|
26 |
+
|
27 |
/**
|
28 |
* put your comment there...
|
29 |
*
|
css-js-toolbox.class.php
CHANGED
@@ -48,6 +48,11 @@ define('CJTOOLBOX_HTML_CONPONENTS_URL', CJTOOLBOX_URL . '/framework/html/compone
|
|
48 |
*/
|
49 |
class cssJSToolbox extends CJTHookableClass {
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
/**
|
52 |
*
|
53 |
*/
|
48 |
*/
|
49 |
class cssJSToolbox extends CJTHookableClass {
|
50 |
|
51 |
+
/**
|
52 |
+
*
|
53 |
+
*/
|
54 |
+
const CJT_SCRTIPS_WEB_SITE_DOMAIN = 'cjt-scripts.com';
|
55 |
+
|
56 |
/**
|
57 |
*
|
58 |
*/
|
css-js-toolbox.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CSS & JavaScript Toolbox
|
4 |
Plugin URI: http://css-javascript-toolbox.com/css-javascript-toolbox-free
|
5 |
Description: CJT Plugin for WordPress to easily add custom CSS and JavaScript to individual pages
|
6 |
-
Version: 7.1
|
7 |
Author: Wipeout Media
|
8 |
Author URI: http://css-javascript-toolbox.com
|
9 |
License:
|
@@ -105,7 +105,7 @@ class CJTPlugin extends CJTHookableClass {
|
|
105 |
/**
|
106 |
*
|
107 |
*/
|
108 |
-
const VERSION = '7.1-CE' ;
|
109 |
|
110 |
/**
|
111 |
*
|
3 |
Plugin Name: CSS & JavaScript Toolbox
|
4 |
Plugin URI: http://css-javascript-toolbox.com/css-javascript-toolbox-free
|
5 |
Description: CJT Plugin for WordPress to easily add custom CSS and JavaScript to individual pages
|
6 |
+
Version: 7.1.1
|
7 |
Author: Wipeout Media
|
8 |
Author URI: http://css-javascript-toolbox.com
|
9 |
License:
|
105 |
/**
|
106 |
*
|
107 |
*/
|
108 |
+
const VERSION = '7.1.1-CE' ;
|
109 |
|
110 |
/**
|
111 |
*
|
models/statistics-metabox.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @version $ Id; ----.php 21-03-2012 03:22:10 Ahmed Said $
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* No direct access.
|
8 |
+
*/
|
9 |
+
defined('ABSPATH') or die("Access denied");
|
10 |
+
|
11 |
+
/**
|
12 |
+
*
|
13 |
+
* @author Ahmed Said
|
14 |
+
* @version 6
|
15 |
+
*/
|
16 |
+
class CJTStatisticsMetaboxModel {
|
17 |
+
|
18 |
+
/**
|
19 |
+
*
|
20 |
+
*/
|
21 |
+
const CJT_LASTEST_SCRIPT_OPTION_NAME = 'CJTStatisticsMetaboxModel.latestscripts';
|
22 |
+
|
23 |
+
/**
|
24 |
+
*
|
25 |
+
*/
|
26 |
+
const LATEST_SCRIPT_EXPIRES = 86400;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* put your comment there...
|
30 |
+
*
|
31 |
+
* @var mixed
|
32 |
+
*/
|
33 |
+
protected $dbDriver;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* put your comment there...
|
37 |
+
*
|
38 |
+
*/
|
39 |
+
public function __construct() {
|
40 |
+
$this->dbDriver =& cssJSToolbox::getInstance()->getDBDriver();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* put your comment there...
|
45 |
+
*
|
46 |
+
* @param mixed $state
|
47 |
+
* @param mixed $type
|
48 |
+
*/
|
49 |
+
public function getBlocksCount($state, $type) {
|
50 |
+
$result = $this->dbDriver->select("SELECT count(*) blocksCount FROM #__cjtoolbox_blocks WHERE state = '{$state}' AND type='{$type}';", ARRAY_A);
|
51 |
+
return $result[0]['blocksCount'];
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* put your comment there...
|
56 |
+
*
|
57 |
+
*/
|
58 |
+
public function getLatestScripts($count) {
|
59 |
+
// Initialize.
|
60 |
+
$scriptsSiteDomain = cssJSToolbox::CJT_SCRTIPS_WEB_SITE_DOMAIN;
|
61 |
+
$scriptsFeedUrl = "http://{$scriptsSiteDomain}/forums/script-packages/user-scripts/feed/";
|
62 |
+
$latestScriptTransit = get_option(self::CJT_LASTEST_SCRIPT_OPTION_NAME, array(
|
63 |
+
'scripts' => array(),
|
64 |
+
'time' => 0
|
65 |
+
));
|
66 |
+
// Only if cache is expires read feed from server.
|
67 |
+
if ((time() - $latestScriptTransit['time']) > self::LATEST_SCRIPT_EXPIRES) {
|
68 |
+
// Read feed.
|
69 |
+
// Request server => get raw XML feed
|
70 |
+
$feed = wp_remote_get($scriptsFeedUrl);
|
71 |
+
if (gettype($feed) !== 'WP_Error') {
|
72 |
+
$feedContent = wp_remote_retrieve_body($feed);
|
73 |
+
$feedDoc = new SimpleXMLElement($feedContent);
|
74 |
+
// Read only items count specifed by $count param.
|
75 |
+
$items = array();
|
76 |
+
for ($currentIndex = 0; $currentIndex < $count; $currentIndex++) {
|
77 |
+
// Copy only title and link.
|
78 |
+
$xmlItem = $feedDoc->channel->item[$currentIndex];
|
79 |
+
$items[] = array('title' => (string) $xmlItem->title, 'link' => (string) $xmlItem->link);
|
80 |
+
}
|
81 |
+
$latestScriptTransit['scripts'] =& $items;
|
82 |
+
// Hold cache time.
|
83 |
+
$latestScriptTransit['time'] = time();
|
84 |
+
update_option(self::CJT_LASTEST_SCRIPT_OPTION_NAME, $latestScriptTransit);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
return $latestScriptTransit['scripts'];
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* put your comment there...
|
92 |
+
*
|
93 |
+
*/
|
94 |
+
public function getPackagesCount() {
|
95 |
+
$result = $this->dbDriver->select('SELECT count(*) packagesCount FROM #__cjtoolbox_packages;', ARRAY_A);
|
96 |
+
return $result[0]['packagesCount'];
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* put your comment there...
|
101 |
+
*
|
102 |
+
*/
|
103 |
+
public function getTemplatesCount() {
|
104 |
+
$result = $this->dbDriver->select('SELECT count(*) templatesCount FROM #__cjtoolbox_templates WHERE (attributes & 1) = 0;', ARRAY_A);
|
105 |
+
return $result[0]['templatesCount'];
|
106 |
+
}
|
107 |
+
|
108 |
+
} // End class.
|
readme.txt
CHANGED
@@ -2,22 +2,21 @@
|
|
2 |
Contributors: wipeoutmedia
|
3 |
Author URL: http://css-javascript-toolbox.com
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EWDWF75JHT9Q6
|
5 |
-
Tags:
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
Requires at least: 3.9
|
9 |
-
Tested up to: 3.9
|
10 |
-
Stable tag: 7.1
|
11 |
|
12 |
Easily add custom CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them wherever you want.
|
13 |
|
14 |
== Description ==
|
15 |
CSS & JavaScript Toolbox is a powerful code management plugin that gives you the tools to easily and safely modify or extend the functionality and appearance of your WordPress-powered website. You do this by adding custom code directly into unique code blocks and assign them to pages, posts, custom posts, categories, URLs, expressions, and loads more!
|
16 |
|
17 |
-
= CJT Free –
|
18 |
-
|
19 |
-
|
20 |
-
When you get a chance, please click into the CJT website and learn about the [benefits of upgrading to CJT Pro/Dev](http://css-javascript-toolbox.com).
|
21 |
|
22 |
[youtube http://www.youtube.com/watch?v=iyjq7IXBC5E]
|
23 |
|
@@ -29,103 +28,22 @@ Just like plugins, scripts can modify or extend the functionality and appearance
|
|
29 |
= Who is this plugin for? =
|
30 |
This plugin is primarily intended for WordPress website developers and designers. But that is not to say that others would not be able to get use out of it. CJT can be used for a lot of things from; teachers teaching and students learning to code, to mum and dad bloggers wanting to add Google Analytics or other scripts to their website. So whether it be adding free/premium scripts, creating and testing new scripts, streamlining development work, making front-end customisations, or even teaching and learning WordPress – CJT is extremely flexible and versatile.
|
31 |
|
32 |
-
= Have you ever thought? =
|
33 |
-
- Wouldn't it be great to have an easy way to plug code into your Wordpress installation without having to know how to create a Wordpress plugin OR having to modify files through FTP, etc
|
34 |
-
- How nice it would be if you could simply add code that works with WordPress internal code without hacking away at core files
|
35 |
-
- How about a nice simple way to change the appearance of a page or post in your Wordpress website
|
36 |
-
- What about a means to organise your scripts and blocks of code in an easy-to-use graphical web interface
|
37 |
-
|
38 |
= Features =
|
39 |
-
|
40 |
-
|
41 |
-
= Global Code Blocks =
|
42 |
-
Add as many CJT code blocks as you need
|
43 |
-
Assign a code block to multiple Pages/Posts/Categories/etc
|
44 |
-
Edit multiple code blocks at the same time without navigating browsers
|
45 |
-
Reorder code blocks via drag and drop to allow block priority over others
|
46 |
-
|
47 |
-
Assign code blocks to:
|
48 |
-
- Pages (including Child/Sub Pages)
|
49 |
-
- Posts (including Custom Posts)
|
50 |
-
- Categories (including Child/Sub Categories)
|
51 |
-
- Auxiliary Assignments (including Entire Website, Website Backend, All Pages, All Posts, Recent Posts, Blog Index, All Categories, Search Pages, All Archives, Tag Archives, Author Archives, Attachment Pages, and 404 Error Pages)
|
52 |
-
- URLs and Regular Expressions
|
53 |
-
Select to output the code block to the Header/Footer of the assignment
|
54 |
-
|
55 |
-
= Metabox Code Block & Shortcodes =
|
56 |
-
Add CJT metabox code block at the Page/Post level
|
57 |
-
Security setting in Options to enable/disable metabox code block
|
58 |
-
Use CJT shortcodes to output the code block at the Page/Post level (for pinpoint output)
|
59 |
-
TinyMCE button provides a popup, which lists all CJT shortcodes for easy insertion via a single click
|
60 |
-
|
61 |
-
= Code Files =
|
62 |
-
Each code block now supports code files:
|
63 |
-
- Create as many code files as needed
|
64 |
-
- Add a name, language type (i.e. HTML, PHP, CSS and JavaScript), and description for your code file. Editor language will automatically be switched for you
|
65 |
-
- All code files will share the same assignments (e.g. the same Posts/Pages/Categories/etc)
|
66 |
-
- You can turn your code block into a mini project. For example, you can assign a single block with multiple code files to a Page or Post, instead of creating multiple blocks to a single Page or Post
|
67 |
-
- Switch between code files using AJAX
|
68 |
-
- Multiple authors can work on the same block at the same time by editing different code files
|
69 |
-
- When executed all block code files will be merged together and involved as a single file
|
70 |
-
|
71 |
-
= Templates & Packages =
|
72 |
-
External Link function seamlessly download a third-party script (e.g. from CDN), add it as a template and link it to the current code block
|
73 |
-
|
74 |
-
Code Template Manager allows you to:
|
75 |
-
- Create HTML, PHP, CSS and JavaScript code templates so you can link or embed them to your code blocks
|
76 |
-
- Centralise your library/third-party codes by linking templates, which is using WordPress scripts/styles queue to avoid conflicts
|
77 |
-
|
78 |
-
Template Lookup System allows you to:
|
79 |
-
- Link/embed BOTH Templates and even WordPress built-in scripts/styles (such as jQuery, Thickbox, etc) that are bundled with WordPress
|
80 |
-
|
81 |
-
Package System allows you to:
|
82 |
-
- Install packages from the CJT website
|
83 |
-
- Create your own packages (zip package made up of code blocks and templates)
|
84 |
-
- Work in external editors, save all code blocks and templates into files, and then import them into CJT via a simple definition.xml file
|
85 |
-
- Share packages with other CJT developers
|
86 |
-
- Define block parameters, making it possible to utilise shortcode parameters form, which allows block to prompt for parameters when inserted as a shortcode
|
87 |
-
|
88 |
-
= Cool Tools =
|
89 |
-
Write HTML, PHP, CSS and JavaScript using the Advanced Code Editor
|
90 |
-
Powerful editor coding tools like: Undo, Redo, Find, Replace, Go To Line, Fold, UnFold, Collapse and Expand, and much more!
|
91 |
-
Code Auto Completion is a powerful helper tool to quickly auto-complete HTML, PHP, CSS and JavaScript code syntax and code snippets
|
92 |
-
Syntax highlighting and error checking
|
93 |
-
Around 30 editor and code block themes to choose from
|
94 |
-
|
95 |
-
Many batch operations including:
|
96 |
-
- Activate/Deactivate/Revert state for all code blocks (great for debugging)
|
97 |
-
- Switch all code blocks to either the Header or Footer
|
98 |
-
- Delete all or delete only the empty code blocks
|
99 |
-
Create multiple backups for all your code blocks, allowing them all to be restored
|
100 |
-
Create multiple code block revisions, allowing the single block to be restored
|
101 |
-
Tools allow for font-size adjustment, full-width and full-screen editing
|
102 |
-
Minimise or maximise all code blocks with a single click
|
103 |
-
|
104 |
-
= Performance =
|
105 |
-
Have you ever noticed how your website can start slowing down when you add more and more WordPress plugins into the mix. Unfortunately plugins can bloat your website and use unnecessary resources if they are used when not needed. CJT only reserves memory resources and usage processes when it needs to, otherwise it will not get involved. Additionally, by adding scripts that emulate an existing plugin, YOU get to decide exactly where the script will run.
|
106 |
-
|
107 |
-
CJT has been fully tested using over 100 code blocks and 1000′s of assignments (e.g. Posts/Pages/Categories/etc). This was made possible using a combination of AJAX scrolling and pagination. In fact, 99% of CJT utilises AJAX technology, which means there is no need to refresh/reload the webpage
|
108 |
-
|
109 |
-
= Follow the Developments =
|
110 |
-
If you like to know more about the development state, issues and to track future versions code please follow us on [GitHub Plugin repository](https://github.com/css-javascript-toolbox/css-javascript-toolbox-plugin).
|
111 |
|
112 |
= Thank You =
|
113 |
-
We would like to
|
114 |
-
|
115 |
-
- Providing a [feedback review and rating](http://wordpress.org/support/view/plugin-reviews/css-javascript-toolbox) on WordPress.org
|
116 |
-
- Visiting our [CJT website](http://css-javascript-toolbox.com) and letting us know your thoughts on using the plugin, notifying us of any bugs and issues, and providing us with feature requests.
|
117 |
-
- Liking [CJToolbox on Facebook](https://www.facebook.com/CJToolbox)
|
118 |
-
- Following [CJToolbox on Twitter](https://twitter.com/CJToolbox)
|
119 |
-
- Subscribing to [CJToolbox on Youtube](http://www.youtube.com/user/cjtoolbox)
|
120 |
|
121 |
-
|
|
|
|
|
122 |
|
123 |
-
|
124 |
-
|
125 |
|
126 |
== Installation ==
|
127 |
1. If you're upgrading from older versions its highly recommended to backup your database before upgrading.
|
128 |
-
2. Upload the 'css-
|
129 |
3. Activate the plugin through the 'Plugins' menu in WordPress
|
130 |
4. Click 'CSS & JavaScript Toolbox' link in the main navigation (left side of your Dashboard).
|
131 |
|
@@ -140,10 +58,10 @@ The CJT code block is the basic unit for writing code and to associate it with s
|
|
140 |
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.
|
141 |
|
142 |
= Can you select more than one item from the Assignment Panel? =
|
143 |
-
Yes
|
144 |
|
145 |
= Can you assign multiple blocks to the same items from the Assignment Panel? =
|
146 |
-
Yes
|
147 |
|
148 |
= What is Pages, Posts, Categories and Custom Posts tabs? =
|
149 |
These lists with checkboxes represent all of your WordPress Pages, Posts, Categories and Custom Posts that your entire website contains. It also supports subpages and sub-categories, which you will also find in there.
|
@@ -151,7 +69,7 @@ These lists with checkboxes represent all of your WordPress Pages, Posts, Catego
|
|
151 |
= What is the Auxiliary tab? =
|
152 |
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 be used, you will find them pre-defined in the Auxiliary tab. In the Auxiliary tab you can find pages like: Home, Blog Index, Author, 404 error, Tag, Archive, Entire website, Front-end, Admin backend and much more!
|
153 |
|
154 |
-
= Is it better to use the URLs tab, or
|
155 |
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.
|
156 |
|
157 |
= What is the Advanced Expressions tab? =
|
@@ -160,14 +78,14 @@ The Advanced Expression tab allows you to fully control what requests to integra
|
|
160 |
= Can I move the blocks around? =
|
161 |
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.
|
162 |
|
163 |
-
= Is block
|
164 |
-
Yes
|
165 |
|
166 |
= Is block orders immediately saved after drag-and-drop block box? =
|
167 |
-
No
|
168 |
|
169 |
= Is block immediately deleted after removed from the blocks list page? =
|
170 |
-
No
|
171 |
|
172 |
= I'm using the URLs tab and my code is not working? =
|
173 |
Make sure you have copied and pasted the Page, Post, or Category URL exactly as it appears in the address bar. For example, you may have inadvertently included an extra forward slash at the end of your URL.
|
@@ -176,7 +94,7 @@ Make sure you have copied and pasted the Page, Post, or Category URL exactly as
|
|
176 |
Hook location feature gives you control over the location of outputting the CSS/JS code. This is useful in case overriding another plugins' CSS is required. Also sometimes its better to put your JS code in the footer to avoid slowing down your page load.
|
177 |
|
178 |
= I received a weird error, what do I do now? =
|
179 |
-
|
180 |
|
181 |
== Screenshots ==
|
182 |
|
@@ -209,6 +127,8 @@ Sometimes a bug decides to rear its ugly head and when this happens, this is whe
|
|
209 |
27. Block Info Dialog
|
210 |
|
211 |
== Changelog ==
|
|
|
|
|
212 |
|
213 |
= 7.1 =
|
214 |
* Enhance: Processing and Memory optimization for better performance.
|
@@ -386,22 +306,6 @@ Sometimes a bug decides to rear its ugly head and when this happens, this is whe
|
|
386 |
= 0.3 =
|
387 |
* This is the very first release.
|
388 |
|
389 |
-
== Upgrade Notice ==
|
390 |
-
|
391 |
-
= 0.8 =
|
392 |
-
Its recommended to backup your database before upgrading.
|
393 |
-
Templates feature/system is not available anymore! Please backup your templates data manually before upgrading.
|
394 |
-
You can do this by copying and pasting CSS and JS template data into a text editor and saving your text file.
|
395 |
-
If you have any other third-party plugin or software integrated with the CJT plugin database, please note that the database structure has been completely changed in CJT Free.
|
396 |
-
Linked scripts are now obsolete! If you've linked scripts with any code blocks, then those blocks might stop working.
|
397 |
-
|
398 |
-
= 0.3 =
|
399 |
-
Its recommended to backup your database before upgrading.
|
400 |
-
Templates feature/system is not available anymore! Please backup your templates data manually before upgrading.
|
401 |
-
You can do this by copying and pasting CSS and JS template data into a text editor and saving your text file. If you have any other third-party plugin or software integrated with the CJT plugin database, please note that the database structure has been completely changed in CJT Free.
|
402 |
-
Code block names will get changed as 'CSS & Javascript Block' phrase will be removed and replaced by 'Block' word.
|
403 |
-
The double-slashes fix modules is now obsolete! If you have extra slashes (double slashes) in your code block you have to clean it manually yourself or upgrade to version 0.8 to fix them first!
|
404 |
-
|
405 |
== Credits ==
|
406 |
|
407 |
Copyright © 2013, Wipeout Media.
|
2 |
Contributors: wipeoutmedia
|
3 |
Author URL: http://css-javascript-toolbox.com
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EWDWF75JHT9Q6
|
5 |
+
Tags: post, posts, admin, sidebar, page, pages, image, plug, plugin, customise, style, scripts, hack, Wordpress, HTML, CSS, JavaScript, HTML5, jQuery, PHP, code, script, scripts, manage, management, display, output, header, footer, apply, requests, match, hook, execute, run
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
Requires at least: 3.9
|
9 |
+
Tested up to: 3.9.1
|
10 |
+
Stable tag: 7.1.1
|
11 |
|
12 |
Easily add custom CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them wherever you want.
|
13 |
|
14 |
== Description ==
|
15 |
CSS & JavaScript Toolbox is a powerful code management plugin that gives you the tools to easily and safely modify or extend the functionality and appearance of your WordPress-powered website. You do this by adding custom code directly into unique code blocks and assign them to pages, posts, custom posts, categories, URLs, expressions, and loads more!
|
16 |
|
17 |
+
= Like CJT Free – Upgrade to CJT Pro/Dev =
|
18 |
+
If you like CJT Free, we hope you can support the continued development by upgrading to CJT Pro or CJT Dev.
|
19 |
+
Click to learn about the [benefits of upgrading to CJT Pro/Dev](http://css-javascript-toolbox.com/pricing).
|
|
|
20 |
|
21 |
[youtube http://www.youtube.com/watch?v=iyjq7IXBC5E]
|
22 |
|
28 |
= Who is this plugin for? =
|
29 |
This plugin is primarily intended for WordPress website developers and designers. But that is not to say that others would not be able to get use out of it. CJT can be used for a lot of things from; teachers teaching and students learning to code, to mum and dad bloggers wanting to add Google Analytics or other scripts to their website. So whether it be adding free/premium scripts, creating and testing new scripts, streamlining development work, making front-end customisations, or even teaching and learning WordPress – CJT is extremely flexible and versatile.
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
= Features =
|
32 |
+
There are way too many features to list on this CJT description page, so if you want to learn more, please click into the [CSS & JavaScript Toolbox website](http://css-javascript-toolbox.com).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
= Thank You =
|
35 |
+
We would first like to thank you for installing our WordPress plugin. If you like this plugin, find it useful, and appreciate the huge amount of work that has gone into creating it, you can certainly support our efforts by:
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
- Clicking here to [purchase a copy of CJT Pro or CJT Dev](http://css-javascript-toolbox.com/pricing)
|
38 |
+
- Provide a [feedback review and rating](http://wordpress.org/support/view/plugin-reviews/css-javascript-toolbox) on WordPress.org
|
39 |
+
- Spreading the word and recommending the CJT plugin to others.
|
40 |
|
41 |
+
= Follow the Developments =
|
42 |
+
If you like to know more about the development state, issues and to track future versions code please follow us on [GitHub Plugin repository](https://github.com/css-javascript-toolbox/css-javascript-toolbox-plugin).
|
43 |
|
44 |
== Installation ==
|
45 |
1. If you're upgrading from older versions its highly recommended to backup your database before upgrading.
|
46 |
+
2. Upload the 'css-javascript-toolbox' folder to the '/wp-content/plugins/' directory
|
47 |
3. Activate the plugin through the 'Plugins' menu in WordPress
|
48 |
4. Click 'CSS & JavaScript Toolbox' link in the main navigation (left side of your Dashboard).
|
49 |
|
58 |
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.
|
59 |
|
60 |
= Can you select more than one item from the Assignment Panel? =
|
61 |
+
Yes. You can select any number of items you need, there is no limitation regarding this.
|
62 |
|
63 |
= Can you assign multiple blocks to the same items from the Assignment Panel? =
|
64 |
+
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.
|
65 |
|
66 |
= What is Pages, Posts, Categories and Custom Posts tabs? =
|
67 |
These lists with checkboxes represent all of your WordPress Pages, Posts, Categories and Custom Posts that your entire website contains. It also supports subpages and sub-categories, which you will also find in there.
|
69 |
= What is the Auxiliary tab? =
|
70 |
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 be used, you will find them pre-defined in the Auxiliary tab. In the Auxiliary tab you can find pages like: Home, Blog Index, Author, 404 error, Tag, Archive, Entire website, Front-end, Admin backend and much more!
|
71 |
|
72 |
+
= Is it better to use the URLs tab, or select items if found through other tabs? =
|
73 |
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.
|
74 |
|
75 |
= What is the Advanced Expressions tab? =
|
78 |
= Can I move the blocks around? =
|
79 |
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.
|
80 |
|
81 |
+
= Is block saved after I click 'Create' in 'Create New Code Block' form? =
|
82 |
+
Yes. The block is created and saved in your database. In order to discard the block, you have to delete it.
|
83 |
|
84 |
= Is block orders immediately saved after drag-and-drop block box? =
|
85 |
+
No. In order to save blocks order you need to press 'Save All Changes' button.
|
86 |
|
87 |
= Is block immediately deleted after removed from the blocks list page? =
|
88 |
+
No. After delete block you need to click 'Save All Changes' button.
|
89 |
|
90 |
= I'm using the URLs tab and my code is not working? =
|
91 |
Make sure you have copied and pasted the Page, Post, or Category URL exactly as it appears in the address bar. For example, you may have inadvertently included an extra forward slash at the end of your URL.
|
94 |
Hook location feature gives you control over the location of outputting the CSS/JS code. This is useful in case overriding another plugins' CSS is required. Also sometimes its better to put your JS code in the footer to avoid slowing down your page load.
|
95 |
|
96 |
= I received a weird error, what do I do now? =
|
97 |
+
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 [purchase a license for any of our plugins](http://css-javascript-toolbox.com/pricing).
|
98 |
|
99 |
== Screenshots ==
|
100 |
|
127 |
27. Block Info Dialog
|
128 |
|
129 |
== Changelog ==
|
130 |
+
= 7.1.1 =
|
131 |
+
* Enhance: Add Statistics Dashboard Widget that shows few useful fields.
|
132 |
|
133 |
= 7.1 =
|
134 |
* Enhance: Processing and Memory optimization for better performance.
|
306 |
= 0.3 =
|
307 |
* This is the very first release.
|
308 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
== Credits ==
|
310 |
|
311 |
Copyright © 2013, Wipeout Media.
|
views/blocks/manager/public/css/blocks.css
CHANGED
@@ -119,4 +119,7 @@ span#dicount-code {
|
|
119 |
font-size: 14px;
|
120 |
background-color: #DFDFDF;
|
121 |
padding: 1px 8px;
|
122 |
-
}
|
|
|
|
|
|
119 |
font-size: 14px;
|
120 |
background-color: #DFDFDF;
|
121 |
padding: 1px 8px;
|
122 |
+
}
|
123 |
+
|
124 |
+
#main-title-links {margin-left: 20px;}
|
125 |
+
#main-title-links a {margin-right: 30px; font-size: 14px;font-weight: bold;}
|
views/blocks/manager/tmpl/blocks.html.tmpl
CHANGED
@@ -10,14 +10,11 @@ defined('ABSPATH') or die("Access denied");
|
|
10 |
<?php require CJTOOLBOX_VIEWS_PATH . '/blocks/block/tmpl/menu/menu.html.tmpl' ?>
|
11 |
<?php require CJTOOLBOX_VIEWS_PATH . '/blocks/block/tmpl/codefile/codefile.html.tmpl' ?>
|
12 |
<h2><?php echo cssJSToolbox::getText('CSS & Javascript Toolbox Free') ?></h2>
|
13 |
-
<
|
14 |
-
|
15 |
-
<
|
16 |
-
|
17 |
-
|
18 |
-
<br />
|
19 |
-
<span>Enter <span id="dicount-code">CJT-DISCOUNT</span> and Save 50% Now!!!!</span>
|
20 |
-
</div>
|
21 |
<div id="cjtoolbox-blocks-page-form" method="post">
|
22 |
<?php wp_nonce_field('cjtoolbox'); ?>
|
23 |
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
|
10 |
<?php require CJTOOLBOX_VIEWS_PATH . '/blocks/block/tmpl/menu/menu.html.tmpl' ?>
|
11 |
<?php require CJTOOLBOX_VIEWS_PATH . '/blocks/block/tmpl/codefile/codefile.html.tmpl' ?>
|
12 |
<h2><?php echo cssJSToolbox::getText('CSS & Javascript Toolbox Free') ?></h2>
|
13 |
+
<span id="main-title-links">
|
14 |
+
<a id="docs-link" target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/pricing/"><?php echo cssJSToolbox::getText('Upgrade to CJT Pro or CJT Dev') ?></a>
|
15 |
+
<a id="docs-link" target="_blank" href="http://<?php echo cssJSToolbox::CJT_SCRTIPS_WEB_SITE_DOMAIN ?>/"><?php echo cssJSToolbox::getText('Get Free Script Packages') ?></a>
|
16 |
+
<a id="docs-link" target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/documentation/"><?php echo cssJSToolbox::getText('Get Help') ?></a>
|
17 |
+
</span>
|
|
|
|
|
|
|
18 |
<div id="cjtoolbox-blocks-page-form" method="post">
|
19 |
<?php wp_nonce_field('cjtoolbox'); ?>
|
20 |
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
|
views/dashboard/metabox/statistics/public/css/default.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
table#cjt-statcs-metabox {width: 100%;padding: 0 14px 8px;border-bottom: 1px solid #eeeeee;;color: #999999;font-size: 14px;}
|
2 |
+
table#cjt-statcs-metabox strong {color: black;}
|
3 |
+
#cjt-statcs-metabox th {text-align: right;}
|
4 |
+
#cjt-statcs-metabox th {padding-bottom: 10px;}
|
5 |
+
div#cjt-statcs-metabox-info {padding-top: 14px;}
|
6 |
+
.latest-scripts {padding-left: 22px;}
|
7 |
+
.latest-scripts a {font-size: 13px;}
|
views/dashboard/metabox/statistics/public/js/default/default.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
*
|
3 |
+
*/
|
4 |
+
|
5 |
+
/**
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
(function($) {
|
9 |
+
|
10 |
+
/**
|
11 |
+
*
|
12 |
+
*/
|
13 |
+
$(function() {
|
14 |
+
// Make Dashboard metabox unclickable
|
15 |
+
$('#cjt-statistics h3,#cjt-statistics .handlediv').unbind('click.postboxes');
|
16 |
+
});
|
17 |
+
})(jQuery);
|
views/dashboard/metabox/statistics/tmpl/default.html.tmpl
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
?>
|
4 |
+
<table id="cjt-statcs-metabox">
|
5 |
+
<thead>
|
6 |
+
<tr>
|
7 |
+
<th colspan="2"><strong><?php echo cssJSToolbox::getText('Total') ?></strong></th>
|
8 |
+
</tr>
|
9 |
+
</thead>
|
10 |
+
<tbody>
|
11 |
+
<tr>
|
12 |
+
<td><?php echo cssJSToolbox::getText('Active Code Blocks') ?></td>
|
13 |
+
<td><strong><?php echo $this->activeBlocks ?></strong></td>
|
14 |
+
</tr>
|
15 |
+
<tr>
|
16 |
+
<td><?php echo cssJSToolbox::getText('Active Metabox Code Blocks') ?></td>
|
17 |
+
<td><strong><?php echo $this->activeMetaboxBlocks ?></strong></td>
|
18 |
+
</tr>
|
19 |
+
<tr>
|
20 |
+
<td><?php echo cssJSToolbox::getText('Inactive Code Blocks') ?></td>
|
21 |
+
<td><strong><?php echo $this->inactiveBlocks ?></strong></td>
|
22 |
+
</tr>
|
23 |
+
<tr>
|
24 |
+
<td><?php echo cssJSToolbox::getText('Inactive Metabox Code Blocks') ?></td>
|
25 |
+
<td><strong><?php echo $this->inactiveMetaboxBlocks ?></strong></td>
|
26 |
+
</tr>
|
27 |
+
<tr>
|
28 |
+
<td><?php echo cssJSToolbox::getText('Code Templates') ?></td>
|
29 |
+
<td><strong><?php echo $this->templates ?></strong></td>
|
30 |
+
</tr>
|
31 |
+
<tr>
|
32 |
+
<td><?php echo cssJSToolbox::getText('Script Packages') ?></td>
|
33 |
+
<td><strong><?php echo $this->scriptsPackage ?></strong></td>
|
34 |
+
</tr>
|
35 |
+
<tr>
|
36 |
+
<td class="latest-scripts" colspan="2">
|
37 |
+
<?php foreach ($this->latestSripts as $item) : ?>
|
38 |
+
<em><?php echo cssJSToolbox::getText('Latest') ?>:</em> <a target="blank" href="<?php echo $item['link'] ?>"><?php echo $item['title'] ?></a>
|
39 |
+
<?php endforeach; ?>
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
</tbody>
|
43 |
+
</table>
|
44 |
+
<div id="cjt-statcs-metabox-info">
|
45 |
+
<a target="blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/pricing/"><?php echo cssJSToolbox::getText('Upgrade to CJT Pro or CJT Dev') ?></a>
|
46 |
+
<a target="blank" style="float: right;" href="http://<?php echo cssJSToolbox::CJT_SCRTIPS_WEB_SITE_DOMAIN ?>/"><?php echo cssJSToolbox::getText('Get Script Packages') ?></a>
|
47 |
+
<p><?php echo cssJSToolbox::getText('You\'re using') ?> <strong><?php echo cssJSToolbox::getText('CSS & Javascript Toolbox v') . CJTPlugin::VERSION ?></strong></p>
|
48 |
+
</div>
|
views/dashboard/metabox/statistics/view.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
*/
|
5 |
+
|
6 |
+
// No direct access allowed.
|
7 |
+
defined('ABSPATH') or die("Access denied");
|
8 |
+
|
9 |
+
/**
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
class CJTDashboardMetaboxStatisticsView extends CJTView {
|
13 |
+
|
14 |
+
protected $activeBlocks;
|
15 |
+
protected $activeMetaboxBlocks;
|
16 |
+
protected $inactiveBlocks;
|
17 |
+
protected $inactiveMetaboxBlocks;
|
18 |
+
protected $latestSripts;
|
19 |
+
protected $scriptsPackage;
|
20 |
+
protected $templates;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* put your comment there...
|
24 |
+
*
|
25 |
+
* @param mixed $info
|
26 |
+
* @return CJTInstallerNoticeView
|
27 |
+
*/
|
28 |
+
public function __construct($info) {
|
29 |
+
// CJTView class!
|
30 |
+
parent::__construct($info);
|
31 |
+
// Enqueue scripts.
|
32 |
+
self::enqueueStyles();
|
33 |
+
self::enqueueScripts();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* put your comment there...
|
38 |
+
*
|
39 |
+
* @param mixed $tmpl
|
40 |
+
*/
|
41 |
+
public function display($tmpl = null) {
|
42 |
+
// Initialize.
|
43 |
+
$model = $this->getModel('statistics-metabox');
|
44 |
+
// Prepare view vars.
|
45 |
+
$this->activeBlocks = $model->getBlocksCount('active', 'block');
|
46 |
+
$this->inactiveBlocks = $model->getBlocksCount('inactive', 'block');
|
47 |
+
$this->activeMetaboxBlocks = $model->getBlocksCount('active', 'metabox');
|
48 |
+
$this->inactiveMetaboxBlocks = $model->getBlocksCount('inactive', 'Metabox');
|
49 |
+
$this->scriptsPackage = $model->getPackagesCount();
|
50 |
+
$this->templates = $model->getTemplatesCount();
|
51 |
+
$this->latestSripts = $model->getLatestScripts(1);
|
52 |
+
// Display.
|
53 |
+
echo $this->getTemplate($tmpl);
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* put your comment there...
|
58 |
+
*
|
59 |
+
*/
|
60 |
+
public static function enqueueScripts() {
|
61 |
+
// Use related scripts.
|
62 |
+
self::useScripts(__CLASS__, 'views:dashboard:metabox:statistics:public:js:{CJTDashboardMetaboxStatisticsView-}default');
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* put your comment there...
|
67 |
+
*
|
68 |
+
*/
|
69 |
+
public static function enqueueStyles() {
|
70 |
+
// Use related scripts.
|
71 |
+
self::useStyles(__CLASS__, 'views:dashboard:metabox:statistics:public:css:{CJTDashboardMetaboxStatisticsView-}default');
|
72 |
+
}
|
73 |
+
|
74 |
+
} // End class.
|
75 |
+
|
76 |
+
// Hookable!!
|
77 |
+
CJTDashboardMetaboxStatisticsView::define('CJTDashboardMetaboxStatisticsView');
|