Changeset 1186666
- Timestamp:
- 06/24/2015 07:09:43 AM (11 years ago)
- Location:
- scode-by-mojwp/trunk
- Files:
-
- 7 edited
-
assets/css/admin-style.css (modified) (2 diffs)
-
assets/js/jquery.scode.js (modified) (2 diffs)
-
includes/admin.php (modified) (4 diffs)
-
includes/ajax.php (modified) (1 diff)
-
includes/frontend.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
scode.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scode-by-mojwp/trunk/assets/css/admin-style.css
r1180078 r1186666 31 31 display: none; 32 32 float: left; 33 position: fixed; 34 top: 50%; left: 50%; 33 position: absolute; 35 34 z-index: 99999; 36 35 -webkit-box-shadow: 0px 0px 20px #000; … … 43 42 44 43 .modal-content { 45 width: 400px;44 width: 540px; 46 45 overflow: hidden; 47 46 } -
scode-by-mojwp/trunk/assets/js/jquery.scode.js
r1180078 r1186666 14 14 15 15 $('#fade').css("opacity", 0.8).data('currentModal', id).fadeIn(); 16 17 var topMargin = (modal.height() + 200) / 2; 18 var leftMargin = (modal.width() + 10) / 2; 19 20 modal.fadeIn().css({ 21 'margin-top' : -topMargin, 22 'margin-left' : -leftMargin 16 17 modal.fadeIn().position({ 18 my: "center", 19 at: "center", 20 of: window, 21 collision : "flipfit" 23 22 }); 24 23 } … … 157 156 progressContainer.addClass('hidden'); 158 157 if (data.error) pResult.addClass('error').text(data.error); else pResult.addClass('error').text('Unknown error, please contact the plugin developers...'); 159 } 158 } 159 160 $(modalID).position({ 161 my: "center", 162 at: "center", 163 of: window, 164 collision : "flipfit" 165 }); 160 166 }, 'json'); 161 167 -
scode-by-mojwp/trunk/includes/admin.php
r1180078 r1186666 11 11 wp_enqueue_style('scode_font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), false); 12 12 wp_enqueue_style('scode_backend_style', SCODE_PLUGIN_URL.'assets/css/admin-style.css', array(), false); 13 wp_enqueue_script('jquery-ui-position'); 13 14 wp_enqueue_script('scode_backend_js', SCODE_PLUGIN_URL.'assets/js/jquery.scode.js', array('jquery'), false, true); 15 14 16 } 15 17 } … … 21 23 add_submenu_page('scode', 'sCode — '.__('Instruction', 'scode'), __('Instruction', 'scode'), 'manage_options', 'scode_support', 'scode_support_html'); 22 24 } 25 26 add_filter('wp_default_editor', create_function('', 'return "html";')); 23 27 24 28 function scode_support_html() { … … 161 165 <div class="form-group"> 162 166 <label for="newShortcodeValue"><?php _e('Value', 'scode'); ?>:</label> 163 <textarea class="form-control" id="newShortcodeValue" name="value" rows="3" autocomplete="off"></textarea> 167 <?php 168 $args = array( 169 'wpautop' => 0, 170 'media_buttons' => 1, 171 'textarea_name' => 'value', 172 'textarea_rows' => 10, 173 'teeny' => 1, 174 'tinymce' => 1, 175 'quicktags' => array( 176 'id' => 'newShortcodeValue', 177 'buttons' => 'strong,em,link,img,ul,ol,li' 178 ), 179 ); 180 wp_editor( '', 'newShortcodeValue', $args ); ?> 164 181 </div> 165 182 <?php if (!empty($groups)) { ?> … … 213 230 <div class="form-group"> 214 231 <label for="editableShortcodeValue"><?php _e('Value', 'scode'); ?>:</label> 215 <textarea class="form-control" id="editableShortcodeValue" name="value" rows="3" autocomplete="off"></textarea> 232 <?php 233 $args = array( 234 'wpautop' => 0, 235 'media_buttons' => 1, 236 'textarea_name' => 'value', 237 'textarea_rows' => 10, 238 'teeny' => 1, 239 'tinymce' => 1, 240 'quicktags' => array( 241 'id' => 'editableShortcodeValue', 242 'buttons' => 'strong,em,link,img,ul,ol,li' 243 ), 244 ); 245 wp_editor( '', 'editableShortcodeValue', $args ); ?> 216 246 </div> 217 247 <div class="form-row"> -
scode-by-mojwp/trunk/includes/ajax.php
r1180078 r1186666 9 9 function scode_ajax_add_shortcode() { 10 10 $nonce = $_POST['scode_new_nonce']; 11 // scode_new_nonce 11 12 12 if (!wp_verify_nonce($nonce, 'addNewShortcode')) wp_die(json_encode(array('error' => __('Nonce verify fail...', 'scode')))); 13 13 if (!current_user_can('manage_options')) wp_die(json_encode(array('error' => __('No rights...', 'scode')))); -
scode-by-mojwp/trunk/includes/frontend.php
r1180078 r1186666 6 6 } 7 7 8 remove_filter( 'the_content', 'wpautop');9 add_filter( 'the_content', 'wpautop' , 12);8 remove_filter('the_content', 'shortcode_unautop'); 9 remove_filter('the_excerpt', 'shortcode_unautop'); 10 10 11 11 $sc_shortcodes_array = array(); -
scode-by-mojwp/trunk/readme.txt
r1180106 r1186666 73 73 == Changelog == 74 74 75 = 1.1 = 76 * Add Formatting toolbar 77 * Bug fixes 78 75 79 = 1.0 = 76 80 Release -
scode-by-mojwp/trunk/scode.php
r1180124 r1186666 5 5 Description: Easy way to creat and manage shortcode from Admin panel site. Создавайте и управляйте шорткодами прямо из админки сайта. 6 6 Author: mojWP 7 Version: 1. 07 Version: 1.1 8 8 Author URI: http://mojwp.ru/ 9 9 Text Domain: scode … … 17 17 } 18 18 19 define('SCODE_VERSION', '1. 0');19 define('SCODE_VERSION', '1.1'); 20 20 define('SCODE_PLUGIN_DIR', plugin_dir_path(__FILE__)); 21 21 define('SCODE_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset
for help on using the changeset viewer.