Changeset 3093833
- Timestamp:
- 05/28/2024 11:21:19 AM (19 months ago)
- Location:
- viitor-shortcodes/trunk
- Files:
-
- 8 edited
-
includes/admin/class-ww-vcsc-admin.php (modified) (6 diffs)
-
includes/admin/forms/ww-vcsc-popup.php (modified) (1 diff)
-
includes/class-ww-vcsc-scripts.php (modified) (4 diffs)
-
includes/class-ww-vcsc-shortcodes.php (modified) (4 diffs)
-
includes/css/ww-vcsc-public.css (modified) (2 diffs)
-
includes/js/ww-vcsc-buttons.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
ww-wp-shortcodes.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
viitor-shortcodes/trunk/includes/admin/class-ww-vcsc-admin.php
r3028594 r3093833 12 12 * 13 13 * @package WP Shortcodes 14 * @since 1.0.014 * @since 3.0.0 15 15 */ 16 16 class Ww_Wpsc_Admin { … … 30 30 * 31 31 * @package WP Shortcodes 32 * @since 1.0.032 * @since 3.0.0 33 33 */ 34 34 public function ww_vcsc_shortcode_editor_register_button( $buttons ) { … … 46 46 * 47 47 * @package WP Shortcodes 48 * @since 1.0.048 * @since 3.0.0 49 49 */ 50 50 public function ww_vcsc_shortcode_editor_button_script( $plugin_array ) { … … 63 63 * 64 64 * @package WP Shortcodes 65 * @since 1.0.065 * @since 3.0.0 66 66 */ 67 67 public function ww_vcsc_shortcode_button() { … … 83 83 * 84 84 * @package WP Shortcodes 85 * @since 1.0.085 * @since 3.0.0 86 86 */ 87 87 public function ww_vcsc_shortcode_popup_markup() { … … 94 94 * 95 95 * @package WP Shortcodes 96 * @since 1.0.096 * @since 3.0.0 97 97 */ 98 98 public function add_hooks() { -
viitor-shortcodes/trunk/includes/admin/forms/ww-vcsc-popup.php
r3028594 r3093833 13 13 * 14 14 * @package WP Shortcodes 15 * @since 1.0.015 * @since 3.0.0 16 16 */ 17 17 -
viitor-shortcodes/trunk/includes/class-ww-vcsc-scripts.php
r3028594 r3093833 13 13 * 14 14 * @package WP Shortcodes 15 * @since 1.0.015 * @since 3.0.0 16 16 */ 17 17 class Ww_Wpsc_Scripts { … … 26 26 * 27 27 * @package WP Shortcodes 28 * @since 1.0.028 * @since 3.0.0 29 29 */ 30 30 public function ww_vcsc_public_styles() { … … 40 40 * 41 41 * @package WP Shortcodes 42 * @since 1.0.042 * @since 3.0.0 43 43 */ 44 44 public function ww_vcsc_admin_styles( $hook_suffix ) { … … 62 62 * 63 63 * @package WP Shortcodes 64 * @since 1.0.064 * @since 3.0.0 65 65 */ 66 66 public function add_hooks() { -
viitor-shortcodes/trunk/includes/class-ww-vcsc-shortcodes.php
r3028594 r3093833 13 13 * 14 14 * @package WP Shortcodes 15 * @since 1.0.015 * @since 3.0.0 16 16 */ 17 17 class Ww_Wpsc_Shortcodes { … … 27 27 * 28 28 * @package WP Shortcodes 29 * @since 1.0.029 * @since 3.0.0 30 30 */ 31 31 public function ww_vcsc_boxes( $atts, $content ) { … … 57 57 * 58 58 * @package WP Shortcodes 59 * @since 1.0.059 * @since 3.0.0 60 60 */ 61 61 public function ww_vcsc_button( $atts, $content ) { … … 72 72 * 73 73 * @package WP Shortcodes 74 * @since 1.0.074 * @since 3.0.0 75 75 */ 76 76 public function add_hooks() { -
viitor-shortcodes/trunk/includes/css/ww-vcsc-public.css
r1779448 r3093833 1 1 /* ############## boxes type css start ################*/ 2 .ww-vcsc-boxstandard {3 border: 1px solid #FFFFFF;4 color: #6D6E6E;2 .ww-vcsc-boxstandard { 3 border: 1px solid #FFFFFF; 4 color: #6D6E6E; 5 5 background: none repeat scroll 0 0 #F1F1F1; 6 6 margin: 0 0 10px; 7 padding: 15px 45px 15px 45px; 7 padding: 15px 45px 15px 45px; 8 8 9 9 } 10 10 11 .ww-vcsc-boxinfo { 11 background: url(../images/box-info.png)no-repeat scroll 7px 6px #BEDEFF;12 background: url(../images/box-info.png) no-repeat scroll 7px 6px #BEDEFF; 12 13 border: 1px solid #E7F3FF; 13 color: #517193;14 color: #517193; 14 15 padding: 15px 55px 15px 55px; 15 border-radius: 4px; 16 border-radius: 4px; 16 17 } 17 .ww-vcsc-boxwarning{ 18 background:url(../images/box-warning.png) no-repeat scroll 7px 6px #F7F4B4; 19 border: 1px solid #FFFFEA; 20 color: #8C8A64; 18 19 .ww-vcsc-boxwarning { 20 background: url(../images/box-warning.png) no-repeat scroll 7px 6px #F7F4B4; 21 border: 1px solid #FFFFEA; 22 color: #8C8A64; 21 23 padding: 15px 45px 15px 45px; 22 border-radius: 4px; 24 border-radius: 4px; 23 25 } 24 .ww-vcsc-boxdownload{ 25 background:url(../images/box-download.png) no-repeat scroll 7px 6px #C0F0B3; 26 border: 1px solid #E9FFE3; 27 color: #5C8A50; 26 27 .ww-vcsc-boxdownload { 28 background: url(../images/box-download.png) no-repeat scroll 7px 6px #C0F0B3; 29 border: 1px solid #E9FFE3; 30 color: #5C8A50; 28 31 padding: 15px 54px 15px 54px; 29 border-radius: 4px; 32 border-radius: 4px; 30 33 } 34 31 35 .ww-vcsc-boxerror { 32 background:url(../images/box-error.png) no-repeat scroll 7px 6px #FFCEBE;33 border: 1px solid #FFEEE8;34 color: #957368;36 background: url(../images/box-error.png) no-repeat scroll 7px 6px #FFCEBE; 37 border: 1px solid #FFEEE8; 38 color: #957368; 35 39 padding: 15px 45px 15px 45px; 36 border-radius: 4px; 40 border-radius: 4px; 37 41 } 38 .ww-vcsc-boxstandard,.ww-vcsc-boxinfo,.ww-vcsc-boxwarning,.ww-vcsc-boxdownload,.ww-vcsc-boxerror{ 39 font-family: 'Droid Sans,Arial',Verdana,sans-serif; 40 font-size: 14px; 41 line-height: 21px; 42 float: left; 42 43 .ww-vcsc-boxstandard, 44 .ww-vcsc-boxinfo, 45 .ww-vcsc-boxwarning, 46 .ww-vcsc-boxdownload, 47 .ww-vcsc-boxerror { 48 font-family: 'Droid Sans,Arial', Verdana, sans-serif; 49 font-size: 14px; 50 line-height: 21px; 51 float: left; 43 52 min-height: 57px; 44 53 line-height: 18px; 45 54 margin: 0 0 10px; 46 margin: 20px;47 width: auto;48 clear: both;55 margin: 20px; 56 width: auto; 57 clear: both; 49 58 min-width: 145px; 50 59 width: 190px; 51 text-align: center;60 text-align: center; 52 61 color: #000; 53 border-radius: 6px;62 border-radius: 6px; 54 63 } 64 55 65 /*.ww-vcsc-boxstandard{ 56 66 width:100% !important; … … 60 70 61 71 /**************** Button CSS Start *************************/ 62 a.ww-vcsc-button.orange {63 background: -moz-linear-gradient(center top , #FAA51A, #F47A20) repeat scroll 0 0 transparent;64 background: -webkit-gradient(linear, left top, left bottom, color-stop(.2, #FAA51A), color-stop(1, #F47A20));72 a.ww-vcsc-button.orange { 73 background: -moz-linear-gradient(center top, #FAA51A, #F47A20) repeat scroll 0 0 transparent; 74 background: -webkit-gradient(linear, left top, left bottom, color-stop(.2, #FAA51A), color-stop(1, #F47A20)); 65 75 background-color: #d76b23; 66 border: 1px solid #DA7C0C;67 color: #FEF4E9;76 border: 1px solid #DA7C0C; 77 color: #FEF4E9; 68 78 } 69 a.ww-vcsc-button.orange:hover{ 79 80 a.ww-vcsc-button.orange:hover { 70 81 background: #d25e00; 71 background: -moz-linear-gradient(center top , #F88E11, #F06015) repeat scroll 0 0 transparent;72 background: -webkit-gradient(linear, left top, left bottom, color-stop(.2, #F88E11), color-stop(1, #F06015));82 background: -moz-linear-gradient(center top, #F88E11, #F06015) repeat scroll 0 0 transparent; 83 background: -webkit-gradient(linear, left top, left bottom, color-stop(.2, #F88E11), color-stop(1, #F06015)); 73 84 } 74 a.ww-vcsc-button.orange:active{ 75 background: -moz-linear-gradient(center top , #F47A20, #FAA51A) repeat scroll 0 0 transparent; 76 background: -webkit-gradient(linear, left top, left bottom, color-stop(.2, #F47A20), color-stop(1,#FAA51A)); 77 color: #FCD3A5; 85 86 a.ww-vcsc-button.orange:active { 87 background: -moz-linear-gradient(center top, #F47A20, #FAA51A) repeat scroll 0 0 transparent; 88 background: -webkit-gradient(linear, left top, left bottom, color-stop(.2, #F47A20), color-stop(1, #FAA51A)); 89 color: #FCD3A5; 78 90 } 79 a.ww-vcsc-button span{ 91 92 a.ww-vcsc-button span { 80 93 line-height: 1.2em; 81 min-height: 16px;94 min-height: 16px; 82 95 } 83 a.ww-vcsc-button.large{ 96 97 a.ww-vcsc-button.large { 84 98 font-size: 1.4em; 85 padding: 7px 46px;99 padding: 7px 46px; 86 100 } 87 .ww-vcsc-button-container{ 88 margin-bottom:10px; 101 102 .ww-vcsc-button-container { 103 margin-bottom: 10px; 89 104 } 105 106 .ww-vcsc-boxinfo a.button { 107 text-decoration: none; 108 font-size: 18px; 109 } 110 90 111 /**************** Button CSS End *************************/ -
viitor-shortcodes/trunk/includes/js/ww-vcsc-buttons.js
r1754949 r3093833 1 // JavaScript Document 2 jQuery(document).ready(function($) { 1 jQuery(document).ready(function ($) { 3 2 4 // Start Single Shortcode Start 5 (function() { 6 tinymce.create('tinymce.plugins.wwvcscsingleshortcode', { 7 init : function(ed, url) { 8 9 ed.addButton('wwvcscsingleshortcode', { 10 title : 'My Single Shortcode', 11 image : url+'/images/ww-vcsc-single.png', 12 onclick : function() { 13 14 //send_to_editor(str); 15 tinymce.get('content').execCommand('mceInsertContent',false, '[ww_vcsc_button][/ww_vcsc_button]'); 16 17 } 18 }); 19 }, 20 createControl : function(n, cm) { 21 return null; 22 }, 23 }); 24 25 tinymce.PluginManager.add('wwvcscsingleshortcode', tinymce.plugins.wwvcscsingleshortcode); 26 })(); 27 // Start Single Shortcode End 3 // Start Single Shortcode Start 4 (function () { 5 tinymce.create('tinymce.plugins.wwvcscsingleshortcode', { 6 init: function (ed, url) { 7 ed.addButton('wwvcscsingleshortcode', { 8 title: 'My Single Shortcode', 9 image: url + '/images/ww-vcsc-single.png', 10 onclick: function () { 11 // Send single shortcode 12 tinymce.get('content').execCommand('mceInsertContent', false, '[ww_vcsc_button][/ww_vcsc_button]'); 13 } 14 }); 15 }, 16 createControl: function (n, cm) { 17 return null; 18 }, 19 }); 28 20 29 // Start Shortcodes Click 30 (function() { 31 tinymce.create('tinymce.plugins.wwvcscshortcodes', { 32 init : function(ed, url) { 33 34 ed.addButton('wwvcscshortcodes', { 35 title : 'My Shortcodes List', 36 image : url+'/images/ww-vcsc.png', 37 onclick : function() { 38 39 jQuery('.ww-vcsc-popup-overlay').fadeIn(); 40 jQuery('.ww-vcsc-popup-content').fadeIn(); 41 42 jQuery('#ww_vcsc_shortcode').val(''); 43 jQuery('#ww_vcsc_box_type_select').val(''); 44 jQuery('#ww_vcsc_box_content').val(''); 45 jQuery('.ww-vcsc-shortcodes-options').hide(); 46 jQuery('.ww_vcsc_box_content').val(''); 47 48 } 49 }); 50 }, 51 createControl : function(n, cm) { 52 return null; 53 }, 54 }); 55 56 tinymce.PluginManager.add('wwvcscshortcodes', tinymce.plugins.wwvcscshortcodes); 57 })(); 58 59 jQuery( document ).on('click', '.ww-vcsc-popup-close-button, .ww-vcsc-popup-overlay', function () { 60 jQuery('.ww-vcsc-popup-overlay').fadeOut(); 61 jQuery('.ww-vcsc-popup-content').fadeOut(); 62 21 tinymce.PluginManager.add('wwvcscsingleshortcode', tinymce.plugins.wwvcscsingleshortcode); 22 })(); 23 // End Single Shortcode 24 25 // Start Shortcodes Click 26 (function () { 27 tinymce.create('tinymce.plugins.wwvcscshortcodes', { 28 init: function (ed, url) { 29 ed.addButton('wwvcscshortcodes', { 30 title: 'My Shortcodes List', 31 image: url + '/images/ww-vcsc.png', 32 onclick: function () { 33 $('.ww-vcsc-popup-overlay, .ww-vcsc-popup-content').fadeIn(); 34 $('#ww_vcsc_shortcode, #ww_vcsc_box_type_select, #ww_vcsc_box_content').val(''); 35 $('.ww-vcsc-shortcodes-options').hide(); 36 } 37 }); 38 }, 39 createControl: function (n, cm) { 40 return null; 41 }, 42 }); 43 44 tinymce.PluginManager.add('wwvcscshortcodes', tinymce.plugins.wwvcscshortcodes); 45 })(); 46 47 // Close Popup 48 $(document).on('click', '.ww-vcsc-popup-close-button, .ww-vcsc-popup-overlay', function () { 49 $('.ww-vcsc-popup-overlay, .ww-vcsc-popup-content').fadeOut(); 63 50 }); 64 jQuery( document ).on('click', '#ww_vcsc_insert_shortcode', function () { 65 66 var shortcode = jQuery('#ww_vcsc_shortcode').val(); 51 52 // Insert Shortcode 53 $(document).off('click', '#ww_vcsc_insert_shortcode').on('click', '#ww_vcsc_insert_shortcode', function () { 54 var shortcode = $('#ww_vcsc_shortcode').val(); 67 55 var shortcodestr = ''; 68 if(shortcode == '') { 69 jQuery('.ww-vcsc-popup-error').fadeIn(); 56 57 if (shortcode === '') { 58 $('.ww-vcsc-popup-error').fadeIn(); 70 59 return false; 71 60 } else { 72 jQuery('.ww-vcsc-popup-error').hide(); 73 74 switch(shortcode) { 75 case 'button' : 76 shortcodestr += '[ww_vcsc_button][/ww_vcsc_button]'; 77 break; 78 case 'box' : 79 80 var content = jQuery('#ww_vcsc_box_content').val(); 81 var boxtype = jQuery('#ww_vcsc_box_type_select').val(); 82 shortcodestr += '[ww_vcsc_boxes boxtype="'+boxtype+'" showcontent="'+content+'"][/ww_vcsc_boxes]'; 83 break; 84 85 default:break; 86 } 87 88 //send_to_editor(str); 89 tinymce.get('content').execCommand('mceInsertContent',false, shortcodestr); 90 jQuery('.ww-vcsc-popup-overlay').fadeOut(); 91 jQuery('.ww-vcsc-popup-content').fadeOut(); 92 93 61 $('.ww-vcsc-popup-error').hide(); 62 63 switch (shortcode) { 64 case 'button': 65 shortcodestr = '[ww_vcsc_button][/ww_vcsc_button]'; 66 break; 67 case 'box': 68 var content = $('#ww_vcsc_box_content').val(); 69 var boxtype = $('#ww_vcsc_box_type_select').val(); 70 shortcodestr = '[ww_vcsc_boxes boxtype="' + boxtype + '" showcontent="' + content + '"][/ww_vcsc_boxes]'; 71 break; 72 default: 73 break; 74 } 75 76 // Insert shortcode 77 tinymce.get('content').execCommand('mceInsertContent', false, shortcodestr); 78 $('.ww-vcsc-popup-overlay, .ww-vcsc-popup-content').fadeOut(); 94 79 } 95 80 }); 96 jQuery('#ww_vcsc_shortcode').change(function() { 97 98 var shortcode = jQuery(this).val(); 99 jQuery('.ww-vcsc-shortcodes-options').hide(); 100 switch(shortcode) { 101 case 'box' : 102 jQuery('#ww_vcsc_box_type').show(); 103 break; 104 105 default:break; 81 82 // Show Options Based on Shortcode Selection 83 $('#ww_vcsc_shortcode').change(function () { 84 var shortcode = $(this).val(); 85 $('.ww-vcsc-shortcodes-options').hide(); 86 87 if (shortcode === 'box') { 88 $('#ww_vcsc_box_type').show(); 106 89 } 107 90 }); 108 91 109 92 }); -
viitor-shortcodes/trunk/readme.txt
r3028594 r3093833 4 4 Tags:Viitor, Shortcodes, Shortcode, Button, box, page, Download Button, Error Button, Standard Button, Info Button 5 5 Requires at least: 3.8 6 Tested up to: 6. 4.27 Requires PHP: 5.2.4 6 Tested up to: 6.5.3 7 Requires PHP: 5.2.4 or higher 8 8 Stable tag: trunk 9 9 License: GPLv3 -
viitor-shortcodes/trunk/ww-wp-shortcodes.php
r3028594 r3093833 4 4 * Plugin URI: https://viitorcloud.com/blog/ 5 5 * Description: Button shortcodes and shortcodes attributes. 6 * Version: 2.0.06 * Version: 3.0.0 7 7 * Author: Viitorcloud 8 8 * Author URI: https://viitorcloud.com/ 9 9 * 10 10 * @package WP Shortcodes 11 * @since 1.0.011 * @since 3.0.0 12 12 */ 13 13 … … 41 41 * 42 42 * @package WP Shortcodes 43 * @since 1.0.043 * @since 3.0.0 44 44 */ 45 45 load_plugin_textdomain( 'wwvcsc', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); … … 51 51 * 52 52 * @package WP Shortcodes 53 * @since 1.0.053 * @since 3.0.0 54 54 */ 55 55 … … 62 62 * 63 63 * @package WP Shortcodes 64 * @since 1.0.064 * @since 3.0.0 65 65 */ 66 66 … … 74 74 * 75 75 * @package WP Shortcodes 76 * @since 1.0.076 * @since 3.0.0 77 77 */ 78 78 function ww_vcsc_install() { … … 88 88 * 89 89 * @package WP Shortcodes 90 * @since 1.0.090 * @since 3.0.0 91 91 */ 92 92 function ww_vcsc_uninstall() { … … 99 99 * 100 100 * @package WP Shortcodes 101 * @since 1.0.0101 * @since 3.0.0 102 102 */ 103 103 … … 125 125 $ww_vcsc_shortcodes = new Ww_Wpsc_Shortcodes(); 126 126 $ww_vcsc_shortcodes->add_hooks(); 127 128 /** 129 * Enqueue script for admin 130 */ 131 function enqueue_custom_tinymce_plugin() { 132 wp_enqueue_script( 'custom-tinymce-plugin', plugin_dir_url( __FILE__ ) . 'includes/js/ww-vcsc-buttons.js', array( 'jquery' ), '1.0', true ); 133 } 134 add_action( 'admin_enqueue_scripts', 'enqueue_custom_tinymce_plugin' );
Note: See TracChangeset
for help on using the changeset viewer.