Plugin Directory

Changeset 3200112


Ignore:
Timestamp:
12/01/2024 07:18:05 AM (15 months ago)
Author:
wptableeditor
Message:

Code Optimization

Location:
wp-table-editor/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wp-table-editor/trunk/includes/admin/function.php

    r3087848 r3200112  
    183183                column_filter enum('no','yes') NOT NULL,
    184184                column_hidden enum('no','yes') NOT NULL,
     185                column_visibility enum('no','yes') NOT NULL,
    185186                column_total enum('no','yes') NOT NULL,
    186187                column_editable enum('yes','no') NOT NULL,
     
    212213                column_optionlimit int(2) NOT NULL,
    213214                column_characterlimit int(2) NOT NULL,
     215                column_condition enum('','equals','not','empty','notempty') NOT NULL,
     216                column_conditionvalue varchar(250) NOT NULL,
    214217                column_restrictiontitle varchar(250) NOT NULL,
    215218                column_render text NOT NULL,
     
    14411444                'column_filters' => $column_filters,
    14421445                'column_hiddens' => $column_hiddens,
     1446                'column_visibility' => $column_visibility,
    14431447                'column_none' => $column_none,
    14441448                'column_orderable' => $column_orderable,
  • wp-table-editor/trunk/includes/load.php

    r3087848 r3200112  
    138138                $license = self::license();
    139139                $output = array();
    140                 for($i = 1; $i <= 44; $i++){
     140                for($i = 1; $i <= 46; $i++){
    141141                    $variable = 'output'.$i;
    142142                    $$variable = array();
     
    267267                }
    268268                $outputs = array();
    269                 for($i = 1; $i <= 44; $i++){
     269                for($i = 1; $i <= 46; $i++){
    270270                    $variables = 'outputs'.$i;
    271271                    $$variables = array();
     
    273273                $outputs2 = array(0);
    274274                foreach($output as $key => $value){
    275                     for($i = 1; $i <= 44; $i++){
     275                    for($i = 1; $i <= 46; $i++){
    276276                        $_output = 'output'.$i;
    277277                        $_value = 'value'.$i;
     
    370370                $outputs['column_show'] = wp_json_encode($outputs13);
    371371                $outputs['column_hiddens'] = wp_json_encode($outputs8);
     372                $outputs['column_visibility'] = wp_json_encode($outputs46);
    372373                $outputs['column_orderable'] = wp_json_encode($outputs3);
    373374                $outputs['column_searchable'] = wp_json_encode($outputs4);
  • wp-table-editor/trunk/includes/public/shortcode.php

    r3087848 r3200112  
    4242        function xs_enqueue_style(){
    4343            if(!is_admin()){
    44                 wp_register_style( 'xsdatatables', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.css' );
    45                 wp_register_style( 'xsstyle', WPTABLEEDITOR_ASSETS. 'css/style.css' );
    46                 wp_register_style( 'xsfront', WPTABLEEDITOR_ASSETS. 'css/front.css' );
    47                 wp_register_style( 'xstabs', WPTABLEEDITOR_ASSETS. 'css/tabs.css' );
     44                wp_register_style( 'xsdatatables', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.css', array(), WPTABLEEDITOR_VERSION );
     45                wp_register_style( 'xsstyle', WPTABLEEDITOR_ASSETS. 'css/style.css', array(), WPTABLEEDITOR_VERSION );
     46                wp_register_style( 'xsfront', WPTABLEEDITOR_ASSETS. 'css/front.css', array(), WPTABLEEDITOR_VERSION );
     47                wp_register_style( 'xstabs', WPTABLEEDITOR_ASSETS. 'css/tabs.css', array(), WPTABLEEDITOR_VERSION );
    4848                wp_register_style( 'xsshortcode', false );
    49                 wp_register_script( 'xsdatatables', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.js', array('jquery') );
    50                 wp_register_script( 'xsmoment', WPTABLEEDITOR_VENDOR. 'moment/moment.min.js' );
    51                 wp_register_script( 'xsshortcode', WPTABLEEDITOR_ASSETS. 'js/shortcode.js' );
    52                 wp_register_script( 'xstabs', WPTABLEEDITOR_ASSETS. 'js/tabs.js', array('jquery') );
     49                wp_register_script( 'xsdatatables', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.js', array('jquery'), WPTABLEEDITOR_VERSION );
     50                wp_register_script( 'xsmoment', WPTABLEEDITOR_VENDOR. 'moment/moment.min.js', array(), WPTABLEEDITOR_VERSION );
     51                wp_register_script( 'xsshortcode', WPTABLEEDITOR_ASSETS. 'js/shortcode.js', array(), WPTABLEEDITOR_VERSION );
     52                wp_register_script( 'xstabs', WPTABLEEDITOR_ASSETS. 'js/tabs.js', array('jquery'), WPTABLEEDITOR_VERSION );
    5353            }
    5454        }
  • wp-table-editor/trunk/main.php

    r3099993 r3200112  
    44Plugin URI: https://wptableeditor.com/documentation/
    55Description: Table Editor is a WordPress plugin used to quickly create tables from Excel, CSV, JSON and other data sources. Allows you to create beautiful sortable and responsive tables inside your posts, pages, custom post types or widget area.
    6 Version: 1.5.0
     6Version: 1.5.1
    77Author: wptableeditor.com
    88Author URI: https://wptableeditor.com/
     
    1515if ( ! defined( 'WPTABLEEDITOR_ASSETS' ) ) define( 'WPTABLEEDITOR_ASSETS', plugins_url( 'assets/', __FILE__ ) );
    1616if ( ! defined( 'WPTABLEEDITOR_VENDOR' ) ) define( 'WPTABLEEDITOR_VENDOR', plugins_url( 'vendor/', __FILE__ ) );
    17 if ( ! defined( 'WPTABLEEDITOR_VERSION' ) ) define( 'WPTABLEEDITOR_VERSION', '1.5.0' );
     17if ( ! defined( 'WPTABLEEDITOR_VERSION' ) ) define( 'WPTABLEEDITOR_VERSION', '1.5.1' );
    1818if ( ! defined( 'WPTABLEEDITOR_SLUG' ) ) define( 'WPTABLEEDITOR_SLUG', basename( plugin_dir_path( __FILE__ ) ) );
    1919if ( ! defined( 'WPTABLEEDITOR_MAIN' ) ) define( 'WPTABLEEDITOR_MAIN', plugin_basename( __FILE__ ) );
     
    192192            global $pagenow;
    193193            if ( $pagenow === 'admin.php' && isset($_GET['page']) && in_array( $_GET['page'], array( 'wptableeditor' ) ) ) {
    194                 wp_enqueue_style( 'xsbootstrap', WPTABLEEDITOR_VENDOR. 'bootstrap/css/bootstrap.min.css' );
    195                 wp_enqueue_style( 'xsstyle', WPTABLEEDITOR_ASSETS. 'css/style.css' );
    196                 wp_enqueue_style( 'xsadmin', WPTABLEEDITOR_ASSETS. 'css/admin.css' );
    197                 wp_enqueue_script( 'xsbootstrap', WPTABLEEDITOR_VENDOR. 'bootstrap/js/bootstrap.bundle.min.js' );
     194                wp_enqueue_style( 'xsbootstrap', WPTABLEEDITOR_VENDOR. 'bootstrap/css/bootstrap.min.css', array(), WPTABLEEDITOR_VERSION );
     195                wp_enqueue_style( 'xsstyle', WPTABLEEDITOR_ASSETS. 'css/style.css', array(), WPTABLEEDITOR_VERSION );
     196                wp_enqueue_style( 'xsadmin', WPTABLEEDITOR_ASSETS. 'css/admin.css', array(), WPTABLEEDITOR_VERSION );
     197                wp_enqueue_script( 'xsbootstrap', WPTABLEEDITOR_VENDOR. 'bootstrap/js/bootstrap.bundle.min.js', array(), WPTABLEEDITOR_VERSION );
    198198                if($_GET['page'] === 'wptableeditor'){
    199                     wp_enqueue_style( 'wptableeditor', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.css' );
    200                     wp_enqueue_script( 'wptableeditor', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.js' );
     199                    wp_enqueue_style( 'wptableeditor', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.css', array(), WPTABLEEDITOR_VERSION );
     200                    wp_enqueue_script( 'wptableeditor', WPTABLEEDITOR_VENDOR. 'datatables/datatables.min.js', array(), WPTABLEEDITOR_VERSION );
    201201                    wp_enqueue_script( 'jquery-ui-sortable' );
    202202                    if(isset($_GET['tab']) && isset($_GET['table_id'])){
     
    205205                        if($tab === 'column'){
    206206                            $localize = wp_json_encode(wptableeditor_column::localize($table_id));
    207                             wp_enqueue_script( 'xscolumn', WPTABLEEDITOR_ASSETS. 'js/column.js' );
     207                            wp_enqueue_script( 'xscolumn', WPTABLEEDITOR_ASSETS. 'js/column.js', array(), WPTABLEEDITOR_VERSION );
    208208                            wp_add_inline_script( 'xscolumn', 'var xs_ajax_column = '. $localize, 'before' );
    209209                            wp_localize_script( 'xscolumn', 'xs_ajax_localize', wptableeditor_load::localize() );
    210210                        }elseif($tab === 'row'){
    211                             wp_enqueue_script( 'xsmoment', WPTABLEEDITOR_VENDOR. 'moment/moment.min.js' );
    212                             wp_enqueue_script( 'xsaudio', WPTABLEEDITOR_ASSETS. 'js/soundmanager.js' );
     211                            wp_enqueue_script( 'xsmoment', WPTABLEEDITOR_VENDOR. 'moment/moment.min.js', array(), WPTABLEEDITOR_VERSION );
     212                            wp_enqueue_script( 'xsaudio', WPTABLEEDITOR_ASSETS. 'js/soundmanager.js', array(), WPTABLEEDITOR_VERSION );
    213213                            $localize = wp_json_encode(wptableeditor_row::localize($table_id));
    214                             wp_enqueue_script( 'xsrow', WPTABLEEDITOR_ASSETS. 'js/row.js' );
     214                            wp_enqueue_script( 'xsrow', WPTABLEEDITOR_ASSETS. 'js/row.js', array(), WPTABLEEDITOR_VERSION );
    215215                            wp_add_inline_script( 'xsrow', 'var xs_ajax_row = '. $localize, 'before' );
    216216                            wp_localize_script( 'xsrow', 'xs_ajax_localize', wptableeditor_load::localize() );
    217217                        }elseif($tab === 'import'){
    218218                            $localize = wp_json_encode(wptableeditor_import::localize($table_id));
    219                             wp_enqueue_script( 'xsimport', WPTABLEEDITOR_ASSETS. 'js/import.js' );
     219                            wp_enqueue_script( 'xsimport', WPTABLEEDITOR_ASSETS. 'js/import.js', array(), WPTABLEEDITOR_VERSION );
    220220                            wp_add_inline_script( 'xsimport', 'var xs_ajax_import = '. $localize, 'before' );
    221221                            wp_localize_script( 'xsimport', 'xs_ajax_localize', wptableeditor_load::localize() );
     
    223223                    }else{
    224224                        $localize = wp_json_encode(wptableeditor_table::localize());
    225                         wp_enqueue_script( 'xstable', WPTABLEEDITOR_ASSETS. 'js/table.js' );
     225                        wp_enqueue_script( 'xstable', WPTABLEEDITOR_ASSETS. 'js/table.js', array(), WPTABLEEDITOR_VERSION );
    226226                        wp_add_inline_script( 'xstable', 'var xs_ajax_table = '. $localize, 'before' );
    227227                        wp_localize_script( 'xstable', 'xs_ajax_localize', wptableeditor_load::localize() );
  • wp-table-editor/trunk/readme.txt

    r3099993 r3200112  
    33Tags: table, table builder, table editor, datatables
    44Requires at least: 6.0
    5 Tested up to: 6.5.4
     5Tested up to: 6.7.1
    66Requires PHP: 7.2
    7 Stable tag: 1.5.0
     7Stable tag: 1.5.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7474
    7575== Changelog ==
     76
     77= 1.5.1 =
     78* Code Optimization
    7679
    7780= 1.5.0 =
Note: See TracChangeset for help on using the changeset viewer.