Changeset 1237153 for css-javascript-toolbox
- Timestamp:
- 09/03/2015 11:54:49 AM (11 years ago)
- Location:
- css-javascript-toolbox/trunk
- Files:
-
- 17 added
- 1 deleted
- 14 edited
-
access.points/extensions.accesspoint.php (modified) (1 diff)
-
access.points/main (added)
-
access.points/main.accesspoint.php (modified) (2 diffs)
-
access.points/main/8.0.4-AdminNotice.html (added)
-
autoload.inc.php (modified) (1 diff)
-
composer.json (added)
-
controllers/auto-upgrade.php (modified) (2 diffs)
-
controllers/setup.php (modified) (2 diffs)
-
css-js-toolbox.php (modified) (1 diff)
-
framework/CJTStoreUpdate.class.php (added)
-
framework/ServicesAPI (added)
-
framework/ServicesAPI/Exceptions.class.php (added)
-
framework/ServicesAPI/Module.class.php (added)
-
framework/ServicesAPI/Services.class.php (added)
-
framework/ServicesAPI/Store.php (added)
-
framework/extensions/extensions.class.php (modified) (3 diffs)
-
framework/third-party (deleted)
-
models/setup.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
vendor (added)
-
vendor/autoload.php (added)
-
vendor/composer (added)
-
vendor/composer/ClassLoader.php (added)
-
vendor/composer/autoload_classmap.php (added)
-
vendor/composer/autoload_namespaces.php (added)
-
vendor/composer/autoload_psr4.php (added)
-
vendor/composer/autoload_real.php (added)
-
views/blocks/block/tmpl/codefile/codefile.html.tmpl (modified) (1 diff)
-
views/blocks/block/tmpl/edit.html.tmpl (modified) (1 diff)
-
views/blocks/manager/tmpl/blocks.html.tmpl (modified) (1 diff)
-
views/blocks/manager/tmpl/help/intro.html.tmpl (modified) (2 diffs)
-
views/setup/activation-form/public/js/default/default.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
css-javascript-toolbox/trunk/access.points/extensions.accesspoint.php
r1013487 r1237153 20 20 * 21 21 */ 22 const PLUGINS_PAGE_SEARCH_TERM = ' CJT-Extension';22 const PLUGINS_PAGE_SEARCH_TERM = 'css-javascript-toolbox'; 23 23 24 24 /** -
css-javascript-toolbox/trunk/access.points/main.accesspoint.php
r724449 r1237153 36 36 * 37 37 */ 38 public function _adminNotice() { 39 # Initialize 40 static $displayed = 0; 41 42 # Display only for admins 43 if ( ! current_user_can( 'administrator' ) ) { 44 return; 45 } 46 47 # Dismiss if dimisssed 48 if( isset( $_GET[ 'cjtgp-dismiss-803-notice' ] ) ) { 49 update_user_meta( get_current_user_id(), 'cjtgp-dismiss-803-notice', true ); 50 } 51 # Exit if dismissed 52 if ( get_user_meta( get_current_user_id(), 'cjtgp-dismiss-803-notice' ) ) { 53 return; 54 } 55 # Admin notices might run twice!! 56 if( ! $displayed ) { 57 # Don't display again 58 $displayed = true; 59 # Display notice 60 require __DIR__ . DIRECTORY_SEPARATOR . 'main' . DIRECTORY_SEPARATOR . '8.0.4-AdminNotice.html'; 61 } 62 } 63 64 /** 65 * put your comment there... 66 * 67 */ 38 68 protected function doListen() { 39 69 // Register uninstall hook! … … 45 75 // used to run the plugin! 46 76 add_action('plugins_loaded', array(&$this, 'main')); 77 # Admin NOTICE 78 add_action( 'admin_notices', array( $this, '_adminNotice' ) ); 47 79 } 48 80 -
css-javascript-toolbox/trunk/autoload.inc.php
r1009236 r1237153 24 24 $map->offsetSet('CJTAccessPoint', 'framework/access-points/access-point.class.php'); 25 25 $map->offsetSet('CJTPageAccessPoint', 'framework/access-points/page.class.php'); 26 27 28 # Composer Autoloads (All the above autoloads is deprecated and will be revmoed later) 29 require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; -
css-javascript-toolbox/trunk/controllers/auto-upgrade.php
r1009236 r1237153 31 31 // license key! 32 32 $activeLicenses = $model->getStatedLicenses(); 33 // Import EDD updater Class!34 cssJSToolbox::import('framework:third-party:easy-digital-download:auto-upgrade.class.php');35 33 // Activate Automatic upgrade for all activated licenses/components! 36 34 foreach ($activeLicenses as $name => $state) { … … 44 42 // Initializingn vars for a single state/component! 45 43 $pluginFile = ABSPATH . PLUGINDIR . '/' . $state['component']['pluginBase']; 46 // Stop using Cached Data as it causes issue, always47 // get fresh plugin data.48 $plugin = get_plugin_data($pluginFile);49 44 $license =& $state['license']; 50 // Edd API parameter to be send along with he check!51 $requestParams= array(52 'version' => $plugin['Version'],53 'author' => $plugin['AuthorName'],54 'license' => $license['key'],55 'item_name' => $name,56 );57 45 // Set EDD Automatic Updater! 58 $updated = new CJT_EDD_SL_Plugin_Updater($cjtWebServer, $pluginFile, $requestParams); 46 try { 47 CJTStoreUpdate::autoUpgrade( $name, $license[ 'key' ], $pluginFile ); 48 } 49 catch ( CJTServicesAPICallException $exception ) { 50 die( 'CJT AUTO-UPGRADE EXCAPTION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' ); 51 } 59 52 } 60 53 } -
css-javascript-toolbox/trunk/controllers/setup.php
r1009236 r1237153 61 61 protected function licenseAction() { 62 62 // Read request parameters! 63 $action = $_REQUEST[' eddAction'];63 $action = $_REQUEST['licenseAction']; 64 64 $state['component'] = $_REQUEST['component']; 65 65 $state['license'] = $_REQUEST['license']; … … 67 67 $model =& $this->model; 68 68 // Request EDD through EDD SL APIs! 69 $state['response'] = $model->dispatchEddCall($action, $state['component'], $state['license']); 70 // Standarize response object! As check and activate responde by 'valid' and 'invalid' and deactivate responde 71 // by deactivated and faild we then need to make them all likce check and activate! 72 if (($action == 'deactivate') && ($state['response']['license'] != 'error')) { 73 $map = array('deactivated' => 'valid', 'failed' => 'invalid'); 74 $deactivateResponseState = $state['response']['license']; 75 $state['response']['license'] = $map[$deactivateResponseState]; 76 } 69 $state['response'] = $model->dispatchLicenseAction($action, $state['component'], $state['license']); 77 70 // Cahe only if the request is 'activate' or 'deactivate' and the returned state is valid or 'deactivated! respectively. 78 71 if (($action != 'check') && ($state['response']['license'] == 'valid')) { 79 // We need to standarize the response object so the access will be always the same80 // EDD return 'deactivated' and 'valid' with the success request using 'deactivate' and 'activate' repectively!81 // Use valid instead of deactivate!82 if ($action == 'deactivate') {83 $state['response']['license'] = 'valid';84 }85 72 $state['action'] = $model->cacheState($state['component'], $action, $state); 86 73 } -
css-javascript-toolbox/trunk/css-js-toolbox.php
r1039728 r1237153 4 4 Plugin URI: http://css-javascript-toolbox.com/ 5 5 Description: CJT Plugin for WordPress to easily add custom CSS and JavaScript to individual pages 6 Version: 8.0. 36 Version: 8.0.4 7 7 Author: Wipeout Media 8 8 Author URI: http://css-javascript-toolbox.com -
css-javascript-toolbox/trunk/framework/extensions/extensions.class.php
r1013487 r1237153 25 25 * 26 26 */ 27 const PREFIX = 'cjte-';27 const PREFIXS = 'cjte-,css-javascript-toolbox-'; 28 28 29 29 /** … … 163 163 * @return CJTExtensions 164 164 */ 165 public function __construct($prefix = self::PREFIX , $loadMethod = self::LOAD_METHOD) {165 public function __construct($prefix = self::PREFIXS, $loadMethod = self::LOAD_METHOD) { 166 166 // Hookable! 167 167 parent::__construct(); 168 168 // Initializing! 169 $this->prefix = $prefix;169 $this->prefix = explode( ',', $prefix ); 170 170 $this->loadMethod = $loadMethod; 171 171 } … … 204 204 $pluginName = basename($pluginDir); 205 205 // Any plugin with our prefix is a CJT extension! 206 if (strpos($pluginName, $this->prefix) === 0) { 206 if ( ( strpos( $pluginName, $this->prefix[0] ) === 0 ) || 207 ( strpos( $pluginName, $this->prefix[1] ) === 0 ) ) { 207 208 // CJT Extsnsion must has the definition XML file! 208 209 // First try for Edition-Specific file -
css-javascript-toolbox/trunk/models/setup.php
r1009236 r1237153 68 68 * @param mixed $license 69 69 */ 70 public function dispatchEddCall($action, $component, $license) { 71 // Activating License key thorugh EDD APIs! 72 $request['edd_action'] = "{$action}_license"; 73 $request['item_name'] = urlencode($component['name']); 74 $request['license'] = $license['key']; 75 /* CJT Extra Fields For EDD */ 76 //$request['CJTEFFEDD_licenseName'] = $license['name']; 77 // Request the server! 78 $response = wp_remote_get(add_query_arg($request, cssJSToolbox::getCJTWebSiteURL())); 79 // We need only the JSON object returned by EDD APIs. 80 $response = @json_decode(wp_remote_retrieve_body($response), true); 81 // If request error compaitble the response object to be used! 82 if (!$response) { 70 public function dispatchLicenseAction($action, $component, $license) { 71 # Get Plugin File from component base name 72 $pluginFile = WP_PLUGIN_DIR . $component[ 'pluginBase' ]; 73 # Get CJT Store object 74 $store = new CJTStore( $component [ 'name' ], $license[ 'key' ], $pluginFile ); 75 # Build method name from the given action 76 $methodName = "{$action}License"; 77 try { 78 # Call requested method 79 $result = $store->$methodName( $license[ 'name' ] ); 80 # Build response object locally 81 # The structure is taken from EDD license extension as it was used here 82 # when the plugin is orignally developed 83 if ( $result ) { // Success operation 84 $response['license'] = 'valid'; 85 } 86 else { // Operation faild 87 $response['license'] = 'invalid'; 88 } 89 } 90 catch ( CJTServicesAPICallException $exception ) { 91 // If request error compaitble the response object to be used! 83 92 $response = array('license' => 'error', 'component' => $component['name']); 84 93 } -
css-javascript-toolbox/trunk/readme.txt
r1039728 r1237153 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html 8 8 Requires at least: 3.9 9 Tested up to: 4. 110 Stable tag: 8.0. 39 Tested up to: 4.3 10 Stable tag: 8.0.4 11 11 12 12 Easily add custom CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them wherever you want. 13 13 14 14 == Description == 15 = We need your support = 16 Your purchase of CJTe Developer will assist us in the continued development of all CJT plugins on WordPress.org. 17 18 This project is 100% developed and maintained by only two people since the very start in August 2011. We have plenty of [feature ideas that we want to include](http://css-javascript-toolbox.com/development/request), and this can only be possible with funding. 19 20 If you would like to learn more about the additional benefits, please click: [CJTe Developer](http://css-javascript-toolbox.com/cjte-developer). 21 22 = About = 15 = Update Notice = 16 After a long hiatus in development, we have decided to focus our entire efforts on our new premium extension plugin called [CSS & JavaScript Toolbox PLUS](http://css-javascript-toolbox.com/css-javascript-toolbox-plus/), which is designed to work with and UPGRADE the free version. Unfortunately we will be moving many features from the free version into the premium. 17 18 = What does this mean? = 19 For the next update (not this one), we will be removing features from CSS & JavaScript Toolbox Free including: 20 - Custom Posts 21 - Categories 22 - Auxiliary assignments (e.g. entire website, website backend, etc) 23 - Advanced assignments (i.e. URLs and Expressions) 24 - Code Files 25 - Code Templates 26 - Template Lookup System 27 - Packages 28 29 If you rely on the features above, then you can do one of two things: 30 31 1) Stay on [CSS & JavaScript Toolbox Free v8.0.3](https://downloads.wordpress.org/plugin/css-javascript-toolbox.8.0.3.zip), and when the next update arrives, DO NOT UPDATE!!! 32 33 OR 34 35 2) Purchase our premium extension plugin: [CSS & JavaScript Toolbox PLUS](http://css-javascript-toolbox.com/css-javascript-toolbox-plus/) 36 37 Of course if you have already updated, you can use FTP to rollback to the earlier version by manually overwriting the css-javascript-toolbox folder with: [CSS & JavaScript Toolbox Free v8.0.3](https://downloads.wordpress.org/plugin/css-javascript-toolbox.8.0.3.zip) 38 39 = Why purchase PLUS? = 40 [CSS & JavaScript Toolbox PLUS](http://css-javascript-toolbox.com/css-javascript-toolbox-plus/) is our new premium plugin, which will now take up all our time and efforts. It will also contain all of the above features - PLUS these features below: 41 - Editor Themes 42 - Editor Toolbox 43 - Editor Menu Tools 44 - Code Auto Completion (CAC) 45 - Import Export Tool 46 - Block Widget Linker 47 - PLUS more 48 49 We intend to give PLUS a complete makeover, including: 50 - code optimisation and bug fixes 51 - 100% compatibility with the the latest WordPress 52 - a faster and more powerful core 53 - full codebase documentation 54 - and eventually a brand new flat responsive user interface 55 56 = About the CSS & JavaScript Toolbox Plugin = 23 57 CSS & JavaScript Toolbox (or CJT) 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. 24 58 … … 34 68 CJT code blocks can be assigned to pages, posts, custom posts, categories, URLs, expressions, and practically anywhere you want on your website. Code block shortcodes can also provide you with further placement accuracy. 35 69 36 = Want more features for free? =37 Get CJT extension plugins that provide more features such as:38 39 - [Advanced Theme Editor](https://wordpress.org/plugins/cjte-advanced-theme-editor)40 - [Advanced Plugins Editor](https://wordpress.org/plugins/cjte-advanced-plugins-editor)41 - [WP Core Editor](https://wordpress.org/plugins/cjte-wp-core-editor)42 43 = Want to add script plugins? =44 Get script plugins that can be installed on your website running CJT:45 46 - [Image Zoomer](https://wordpress.org/plugins/cjte-image-zoomer/)47 - [Black & White Image Effect](https://wordpress.org/plugins/cjte-black-white-image-effect/)48 49 70 = Support Us = 50 Thank you for your interest in CSS & JavaScript Toolbox. 51 Please support us by: 52 53 - Joining in with the voting and discussion on [new CJT feature ideas](http://css-javascript-toolbox.com/development/request). 54 - Providing a [feedback review and rating](http://wordpress.org/support/view/plugin-reviews/css-javascript-toolbox) on WordPress.org 55 - Spreading the word and recommending CJT to others. 71 The CSS & JavaScript Toolbox project is 100% developed and maintained by only two people since the very beginnings in August 2011. We have plenty of feature ideas that we want to introduce and this can only be possible with funding. 72 73 You can also support us by providing a [feedback review and rating](http://wordpress.org/support/view/plugin-reviews/css-javascript-toolbox) on WordPress.org, and spreading the word and recommending CJT to others. 56 74 57 75 = Follow the Developments = … … 347 365 == Credits == 348 366 349 Copyright © 201 3, Wipeout Media.367 Copyright © 2015, Wipeout Media. 350 368 351 369 This program is free software; you can redistribute it and/or -
css-javascript-toolbox/trunk/views/blocks/block/tmpl/codefile/codefile.html.tmpl
r909069 r1237153 41 41 <li class="separator"></li> 42 42 <li class="quick-toolbar"> 43 <input type="checkbox" class="select-code-file" > |43 <input type="checkbox" class="select-code-file" /> | 44 44 <a class="edit" href="#"><?php echo cssJSToolbox::getText('Edit') ?></a> 45 45 </li> -
css-javascript-toolbox/trunk/views/blocks/block/tmpl/edit.html.tmpl
r909069 r1237153 8 8 ?> 9 9 <div class="cjt-toolbox edit-block-name"> 10 <input type="text" class="block-name" value="" maxlength="50" >10 <input type="text" class="block-name" value="" maxlength="50" /> 11 11 <div class="icons-group"> 12 12 <a class="cjt-tb-link cancel" title="<?php echo cssJSToolbox::getText('Cancel editing code block title') ?>"></a> -
css-javascript-toolbox/trunk/views/blocks/manager/tmpl/blocks.html.tmpl
r1039728 r1237153 14 14 <?php require CJTOOLBOX_VIEWS_PATH . '/blocks/block/tmpl/codefile/codefile.html.tmpl' ?> 15 15 <div id="custom-icon" class="icon32 blocks-icon32"></div> 16 <h2><?php echo cssJSToolbox::getText('CSS & Javascript Toolbox') ?></h2> 17 <span id="support-us"><?php echo cssJSToolbox::getText('Support us by purchasing') ?>: <a target="_blank" href="http://css-javascript-toolbox.com/cjte-developer/">CJTe Developer</a></span> 16 <h2 class="cjt-main-title"><?php echo htmlentities( cssJSToolbox::getText('CSS & Javascript Toolbox') ) ?><?php echo apply_filters( 'cjt_after_main_title', '' ) ?></h2> 17 18 <?php ob_start(); ?> 19 <span id="support-us"><?php echo cssJSToolbox::getText('Support us by purchasing') ?>: <a target="_blank" href="http://css-javascript-toolbox.com/css-javascript-toolbox-plus/"><?php echo htmlentities( cssJSToolbox::getText('CSS & Javascript Toolbox PLUS') ) ?></a></span> 20 <?php echo apply_filters( 'cjt_main_titlt_supportus_link', ob_get_clean() ); ?> 21 18 22 <div id="cjt-banner-bar-right"> 19 23 <span class="cjt-banner-link"> 20 <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/support/"><?php echo cssJSToolbox::getText('Support Forum') ?></a> | 21 24 <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/documentation/"><?php echo cssJSToolbox::getText('Online Documentation') ?></a> 22 25 </span> -
css-javascript-toolbox/trunk/views/blocks/manager/tmpl/help/intro.html.tmpl
r909069 r1237153 8 8 ?> 9 9 10 <h2><?php echo cssJSToolbox::getText('Welcome to the CSS & JavaScript Toolbox dashboard') ?></h2>10 <h2><?php echo htmlentities( cssJSToolbox::getText('Welcome to the CSS & JavaScript Toolbox dashboard') ) ?></h2> 11 11 <p><?php echo cssJSToolbox::getText('Since you do not have any code blocks active, you can either: create a new code block or create a new code template.') ?></p> 12 12 <h4><?php echo cssJSToolbox::getText('Create a new Code Block') ?></h4> … … 15 15 <p><?php echo cssJSToolbox::getText('You can create code templates when you click into the Code Template Manager. To find this, hover over the icon showing a small cog over pages, and a tooltip should say Code Template Manager. Press this and if you have chosen to install the Template Samples, you will notice them sitting in there ready to be used. If you want to create a code template from scratch, click the Create Template button. Here you can choose a name for your code template, select a code language type (i.e. CSS, JavaScript, HTML, PHP), choose whether the template is in Draft or Published state, and then write your code. You have other tabs that allow you to write a Description, add Keywords and Version number, etc. Once you are happy with your code template, you can click the Save button') ?></p> 16 16 <h4><?php echo cssJSToolbox::getText('Embedding or Linking a Code Templates') ?></h4> 17 <p> <?php echo cssJSToolbox::getText('Code Templates can be either embedded or linked into your code blocks. To see all your code templates, you have to click the Template Lookup icon by hovering over the icon with the open /closed angled brackets. A popup will appear showing you code templates in the form of users and they are:') ?></p>17 <p> <?php echo cssJSToolbox::getText('Code Templates can be either embedded or linked into your code blocks. To see all your code templates, you have to click the Template Lookup icon by hovering over the icon with the open|closed angled brackets. A popup will appear showing you code templates in the form of users and they are:') ?></p> 18 18 <ol> 19 19 <li><?php echo cssJSToolbox::getText('WordPress: default code templates that are packaged with WordPress') ?></li> -
css-javascript-toolbox/trunk/views/setup/activation-form/public/js/default/default.js
r1009236 r1237153 97 97 progress.inputs = this.activationForm.find('input').prop('disabled', 'disabled').addClass('disabled'); 98 98 // Pass licene action along out with the form data! 99 var request = $.extend(formData, { eddAction : this.todo});99 var request = $.extend(formData, {licenseAction : this.todo}); 100 100 // Requesing server! 101 101 var action = this.action ? this.action : 'license';
Note: See TracChangeset
for help on using the changeset viewer.