Changeset 1363759
- Timestamp:
- 03/04/2016 03:19:36 AM (10 years ago)
- Location:
- wr-pagebuilder/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (1 diff)
-
assets/woorockets/css/page_builder.css (modified) (1 diff)
-
core/core.php (modified) (1 diff)
-
core/helper/type.php (modified) (2 diffs)
-
shortcodes/text/assets/js/text.js (modified) (1 diff)
-
shortcodes/text/text.php (modified) (1 diff)
-
wr-pagebuilder.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wr-pagebuilder/trunk/README.txt
r1246508 r1363759 135 135 136 136 * Updated Polish translation 137 137 138 138 = 2.5.3 = 139 139 140 140 * Fixed Some minor bugs 141 142 = 2.5.4 = 143 144 * Fixed Bug editor in text element -
wr-pagebuilder/trunk/assets/woorockets/css/page_builder.css
r1129341 r1363759 126 126 #modalOptions .wp-switch-editor { 127 127 height: 27px !important; 128 } 129 #modalOptions #wp-param-text-media-buttons #wr_pb_button { 130 display: none; 128 131 } 129 132 -
wr-pagebuilder/trunk/core/core.php
r1246508 r1363759 167 167 // global variable iframe_load_completed to use in checking load iframe in Text Element Editor 168 168 add_action( 'admin_head', array( &$this, 'add_custom_global_variable' ) ); 169 } 170 169 170 // Add wp editor html 171 add_action( 'wr_pb_footer', array( __CLASS__, 'text_html_wp_editor' ) ); 172 173 } 174 175 /** 176 * Render html wp editor 177 */ 178 public static function text_html_wp_editor() { 179 echo "<script type='text/html' id='tmpl-wr-editor'>"; 180 wp_editor( '_WR_CONTENT_', 'param-text', array( 181 'textarea_name' => 'param-text', 182 'textarea_rows' => 15, 183 'editor_class' => 'wr_pb_editor' 184 ) 185 ); 186 echo '</script>'; 187 } 171 188 172 189 /** -
wr-pagebuilder/trunk/core/helper/type.php
r1168145 r1363759 735 735 */ 736 736 static function get_single_by_post_types( $posttype = '' ) { 737 global $wpdb; 738 737 739 $posttypes = self::get_post_types(); 738 740 $results = array(); … … 740 742 if ( ! isset( $results[$slug] ) ) 741 743 $results[$slug] = array(); 742 // query post by post type 743 $args = array( 'post_type' => $slug, 'posts_per_page' => -1, 'post_status' => ($slug == 'attachment' ) ? 'inherit' : 'publish' ); 744 $query = new WP_Query( $args ); 745 while ( $query->have_posts() ) { 746 $query->the_post(); 747 $results[$slug][get_the_ID()] = __( get_the_title(), WR_PBL ); 748 } 749 wp_reset_postdata(); 744 745 $list_post = $wpdb->get_results( "SELECT ID, post_title FROM $wpdb->posts WHERE post_type = '" . $slug . "' AND post_status = '" . ( ( $slug == 'attachment' ) ? 'inherit' : 'publish' ) . "' ORDER BY post_date DESC", ARRAY_A ); 746 747 if( $list_post ) { 748 foreach( $list_post as $val ) { 749 $results[ $slug ][ $val['ID'] ] = __( $val['post_title'], WR_PBL ); 750 } 751 } 752 750 753 } 751 754 if ( $posttype ) 752 return $results[$posttype]; 755 return $results[$posttype]; 756 753 757 return $results; 754 758 } -
wr-pagebuilder/trunk/shortcodes/text/assets/js/text.js
r1246508 r1363759 31 31 $(document).ready(function () { 32 32 $.WR_Text(); 33 $('#content-html').click(); 33 34 34 var intTimeout = 5000; 35 var intAmount = 100; 36 var isInit = false; 37 $('#param-text-tmce').removeAttr('onclick'); 38 $('#param-text-tmce').off('click'); 35 var intAmount = 100; 36 39 37 var ifLoadedInt = setInterval(function(){ 40 if (iframe_load_completed || intAmount >= intTimeout) { 41 initContentEditor = tinyMCEPreInit.mceInit['param-text']; 42 intAmount += 100; 43 initContentEditor.setup = function(ed){ 44 ed.on('blur', function(){ 45 if ( $('.mce-tinymce').length > 1) { 46 $('.mce-tinymce').first().hide(); 47 } 48 tinyMCE.triggerSave(); 49 jQuery('.wr_pb_editor').first().trigger('change'); 50 }); 51 } 52 // Visual Tab 53 $('#param-text-tmce').click(function(){ 54 setTimeout( function(){ 55 if ( $('.mce-tinymce').length > 1) { 56 $('.mce-tinymce').first().hide(); 57 } 58 },500); 59 tinymce.remove(tinymce.get('param-text')); 60 tinymce.init(initContentEditor); 61 isInit = true; 62 $('#wp-content-wrap').removeClass('html-active'); 63 $('#wp-content-wrap').addClass('tmce-active'); 64 }); 38 if (iframe_load_completed || intAmount >= intTimeout) { 65 39 66 // Text tab 67 $('#param-text-html').click(function(){ 68 setTimeout( function(){ 69 if ( $('.mce-tinymce').length > 1) { 70 $('.mce-tinymce').first().hide(); 71 } 72 },500); 73 tinymce.remove(tinymce.get('param-text')); 74 tinymce.init(initContentEditor); 75 $('#wp-content-wrap').removeClass('tmce-active'); 76 $('#wp-content-wrap').addClass('html-active'); 77 }); 40 var text_content = $( '#param-text.form-control' ).html(); 41 42 var wr_editor = $( '#tmpl-wr-editor' ).html(); 43 44 wr_editor = wr_editor.replace( '_WR_CONTENT_', text_content ); 45 46 $( '#param-text' ).after( wr_editor ); 47 48 $( '#param-text.form-control' ).remove(); 49 50 ( function() { 51 var init, id, $wrap; 52 53 // Render Visual Tab 54 for ( id in tinyMCEPreInit.mceInit ) { 55 if ( id != 'param-text' ) 56 continue; 57 58 init = tinyMCEPreInit.mceInit[id]; 59 $wrap = tinymce.$( '#wp-' + id + '-wrap' ); 60 61 tinymce.remove(tinymce.get('param-text')); 62 tinymce.init( init ); 63 64 setTimeout( function(){ 65 $( '#wp-param-text-wrap' ).removeClass( 'html-active' ); 66 $( '#wp-param-text-wrap' ).addClass( 'tmce-active' ); 67 }, 10 ); 68 69 if ( ! window.wpActiveEditor ) 70 window.wpActiveEditor = id; 71 72 break; 73 } 74 75 // Render Text tab 76 for ( id in tinyMCEPreInit.qtInit ) { 77 if ( id != 'param-text' ) 78 continue; 79 80 quicktags( tinyMCEPreInit.qtInit[id] ); 81 82 // Re call inset quicktags button 83 QTags._buttonsInit(); 84 85 if ( ! window.wpActiveEditor ) 86 window.wpActiveEditor = id; 87 88 break; 89 } 90 }()); 91 78 92 iframe_load_completed = false; 79 93 window.clearInterval(ifLoadedInt); 80 } 94 } 81 95 }, 82 96 intAmount 83 ); 84 97 ); 85 98 86 99 }); -
wr-pagebuilder/trunk/shortcodes/text/text.php
r1129341 r1363759 75 75 'desc' => __( 'Enter some content for this textblock', WR_PBL ), 76 76 'id' => 'text', 77 'type' => 't iny_mce',77 'type' => 'text_area', 78 78 'role' => 'content', 79 79 'std' => WR_Pb_Helper_Type::lorem_text(), -
wr-pagebuilder/trunk/wr-pagebuilder.php
r1246508 r1363759 4 4 * Plugin URI: http://www.woorockets.com 5 5 * Description: Awesome content builder for Wordpress websites 6 * Version: 2.5. 36 * Version: 2.5.4 7 7 * Author: WooRockets Team <[email protected]> 8 8 * Author URI: http://www.wordpress.org/plugins/wr-pagebuilder
Note: See TracChangeset
for help on using the changeset viewer.