Plugin Directory

Changeset 2847042


Ignore:
Timestamp:
01/11/2023 11:14:39 PM (3 years ago)
Author:
codelessthemes
Message:

fixed compatibility with latest PHP, Kirki and WordPress

Location:
codeless-page-builder/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • codeless-page-builder/trunk/README.txt

    r2705104 r2847042  
    77Donate Link: https://codeless.co
    88Requires at least: 5.0
    9 Tested up to: 5.9
     9Tested up to: 6.1.1
    1010Requires PHP: 7.0
    11 Stable tag: 1.1.1
    12 Version: 1.1.1
     11Stable tag: 1.1.2
     12Version: 1.1.2
    1313License: GPLv2 or later
    1414License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • codeless-page-builder/trunk/assets/css/cl-builder.css

    r2250858 r2847042  
    20742074    margin-bottom:0 !important;
    20752075}
     2076
  • codeless-page-builder/trunk/assets/css/kirki-styles.css

    r2675077 r2847042  
    647647  background:transparent;
    648648}
     649
     650.kirki-toggle-switch-label {
     651  cursor: pointer;
     652  display: inline-block;
     653  position: relative;
     654  width: 100%;
     655  clear: both;
     656  height: 40px;
     657}
     658
     659.kirki-react-select__menu{
     660  z-index:99999 !important;
     661}
     662
     663.kirki-tooltip-wrapper{
     664  z-index:0;
     665}
  • codeless-page-builder/trunk/assets/js/cl-builder.js

    r2675077 r2847042  
    45164516               
    45174517                edit: function(){
     4518                    console.log('first-');
    45184519                    cl.app.showEditPanel(this.model);
    45194520                },
  • codeless-page-builder/trunk/assets/js/cl-customize-pane.js

    r2675077 r2847042  
    6363       
    6464        api.previewer.bind('cl_show_options', self.activeElement);
    65         //api.previewer.bind('cl_show_section', self.activeSection);
     65        api.previewer.bind('cl_show_section', self.activeSection);
    6666        api.previewer.bind('cl_create_custom_post', function(data){
    6767
     
    310310    });
    311311
    312     console.log('une daku punoj');
    313 
    314312    return self;
    315313}( jQuery, wp.customize ) );
  • codeless-page-builder/trunk/assets/js/kirki-new.js

    r2705104 r2847042  
    311311
    312312
    313 wp.customize.controlConstructor['grouptitle'] = wp.customize.kirkiDynamicControl.extend({});
     313//wp.customize.controlConstructor['grouptitle'] = wp.customize.kirkiDynamicControl.extend({});
    314314wp.customize.controlConstructor['select_icon'] = wp.customize.kirkiDynamicControl.extend({});
    315315wp.customize.controlConstructor['groupdivider'] = wp.customize.kirkiDynamicControl.extend({});
  • codeless-page-builder/trunk/codeless-builder.php

    r2705104 r2847042  
    9999        add_action( 'plugins_loaded', array( &$this, 'pluginsLoaded' ), 9 );
    100100       
    101         add_action( 'init', array( &$this, 'init' ), 999 );
     101        add_action( 'init', array( &$this, 'init' ), 1 );
    102102
    103103        remove_action('widgets_init', 'NEXForms_widget::register_this_widget');
  • codeless-page-builder/trunk/config/cl-header-elements.php

    r2250479 r2847042  
    44    'title'          => esc_html__( 'Header Builder', 'codeless-builder' ),
    55    'description'    => esc_html__( 'Options for adding an additional element on header', 'codeless-builder' ),
    6     'panel'          => '',
    7     'type'           => '',
    86    'priority'       => 160,
    97    'capability'     => 'edit_theme_options'
  • codeless-page-builder/trunk/config/cl-page-elements.php

    r2675077 r2847042  
    863863               
    864864               
    865                     'device_visibility' => array(
     865                    /*'device_visibility' => array(
    866866                        'type'     => 'multicheck',
    867867                        'priority' => 10,
     
    878878                        'group_vc' => 'Responsive',
    879879
    880                     ),
     880                    ),*/
    881881
    882882                    'col_responsive' => array(
     
    16511651    ),
    16521652
    1653         'device_visibility' => array(
     1653        /*'device_visibility' => array(
    16541654                'type'     => 'multicheck',
    16551655                'priority' => 10,
     
    16651665                'selectClass' => '',
    16661666                'group_vc' => 'Responsive'
    1667             ),
     1667            ),*/
    16681668
    16691669        'css_style_991_col_bool' => array(
  • codeless-page-builder/trunk/include/core/cl-kirki-setup.php

    r2675077 r2847042  
    5757                'title'          => esc_html__( 'Page Builder', 'codeless-builder' ),
    5858                'description'    => esc_html__( 'Options for adding an additional element on header', 'codeless-builder' ),
    59                 'panel'          => '',
    60                 'type'           => '',
    6159                'priority'       => 160,
    6260                'capability'     => 'edit_theme_options'
  • codeless-page-builder/trunk/include/core/cl-page-builder.php

    r2250858 r2847042  
    298298
    299299        if ( count( $found[2] ) === 0 ) {
    300             return $is_container && strlen( $content ) > 0 ? $this->parseShortcodesString( '[cl_text]' . $content . '[/cl_text]', false, $parent_id ) : $content;
     300            return isset($is_container) && strlen( $content ) > 0 ? $this->parseShortcodesString( '[cl_text]' . $content . '[/cl_text]', false, $parent_id ) : $content;
    301301        }
    302302        foreach ( $found[2] as $index => $s ) {
  • codeless-page-builder/trunk/include/core/kirki-setup/codeless_controls.php

    r2675077 r2847042  
    44     * Group Title
    55     */
    6     class Codeless_Controls_Grouptitle_Control extends WP_Customize_Control {
     6    class Codeless_Controls_Grouptitle_Control extends Kirki\Control\Base {
    77        public $type = 'grouptitle';
    8         public function content_template() { ?>
    9             <h3>{{{ data.label }}}</h3>
    10             <?php
    11         }
    12     }
    13 
    14 
    15     class Codeless_Controls_Groupdivider_Control extends WP_Customize_Control {
     8
     9        public function content_template() {
     10            ?>
     11            <h3>{{ data.label }}</h3>
     12            <?php
     13        }
     14
     15        public function render_content() {
     16            ?>
     17            <h3><?php echo $this->label ?></h3>
     18            <?php
     19        }
     20    }
     21
     22
     23    class Codeless_Controls_Groupdivider_Control extends Kirki\Control\Base {
    1624        public $type = 'groupdivider';
     25
    1726        public function content_template() {
    1827             ?>
     
    2130            <?php
    2231        }
     32
     33        public function render_content() {
     34            ?>
     35           
     36           <div class="divider"><?php echo $this->tooltip ?></div>
     37           <?php
     38       }
    2339    }
    2440
     
    273289
    274290    // Register our custom control with Kirki
    275     add_filter( 'kirki/control_types', function( $controls ) {
     291    add_filter( 'kirki_control_types', function( $controls ) {
    276292        $controls['grouptitle'] = 'Codeless_Controls_Grouptitle_Control';
    277293        $controls['groupdivider'] = 'Codeless_Controls_Groupdivider_Control';
     
    291307   
    292308
    293 } );
     309}, 10 );
    294310
    295311add_action( 'customize_register', function( $wp_customize ) {
     
    307323    $wp_customize->register_control_type( 'Codeless_Controls_ImageGallery_Control' );
    308324
    309 });
     325}, 10);
    310326
    311327?>
  • codeless-page-builder/trunk/include/core/shortcodes/cl-shortcode.php

    r2250479 r2847042  
    206206                           
    207207                           
    208                        
     208           
    209209                            if( strpos( $value, 'http' ) == 0 ){
    210210                                $style .= $field[ 'css_property' ] . ': url(' . urldecode( $value ) . ');';
     
    216216                                    if( isset($value['id']) ){
    217217                                        $img = codeless_builder_get_attachment_image_src( (int) $value['id'], 'full' );
    218    
    219                                         $style .= $field['css_property'].': url('.$img.');';
     218                                       
     219                                        if( $img != false && $img != '' )
     220                                            $style .= $field['css_property'].': url('.$img.');';
     221                                        else if( isset( $value['url'] ) ){
     222                                            $style .= $field['css_property'].': url('.urldecode( urldecode( $value['url']) ).');';
     223                                        }
     224
    220225                                    }
    221226                                }
Note: See TracChangeset for help on using the changeset viewer.