Plugin Directory

Changeset 2703621


Ignore:
Timestamp:
04/02/2022 07:02:58 AM (4 years ago)
Author:
OTWthemes
Message:

Version: 1.16

Location:
buttons-shortcode-and-widget
Files:
157 added
11 edited

Legend:

Unmodified
Added
Removed
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_factory/otw_factory.class.php

    r2616902 r2703621  
    1818    public function __construct(){
    1919       
    20         if( isset( $_SERVER['DOCUMENT_ROOT'] ) && preg_match( "/webserver\/otw_wp\/home\/web\/(([0-9])\.([0-9])\.([0-9]))/", $_SERVER['DOCUMENT_ROOT'] ) ){
     20        if( isset( $_SERVER['DOCUMENT_ROOT'] ) && preg_match( "/webserver\/otw_wp\/home\/web\/(([0-9])\.([0-9])\.?([0-9])?)/", $_SERVER['DOCUMENT_ROOT'] ) ){
    2121            $this->upd_tm = 0;
    2222            $this->api_url = 'http://otw_wp_api.com/v1/';
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_factory/otw_factory.info.php

    r2616902 r2703621  
    55Description:  OTW Form
    66Author: OTWthemes.com
    7 Version: 5.1
     7Version: 5.2
    88Author URI: http://themeforest.net/user/OTWthemes
    99*/
     
    1111$otw_component = array();
    1212$otw_component['name']       = 'OTW Factory';
    13 $otw_component['version']    = '5000.1';
     13$otw_component['version']    = '5000.2';
    1414$otw_component['class_name'] = 'OTW_Factory';
    1515?>
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_form/otw_form.class.php

    r2616902 r2703621  
    222222                    }
    223223                    $html .= "</div>";
     224                break;
     225            case 'wpui':
     226                    $html .= "<select ".self::format_attributes( array('id','name','class','style', 'data-reload'), array(), $attributes )." ".$attributes['extra'].">";
     227                   
     228                    foreach( $attributes['options'] as $key => $value ){
     229                        $selected = "";
     230                       
     231                        if( strnatcasecmp( $key, $attributes['value'] ) === 0 ){
     232                            $selected = " selected=\"selected\"";
     233                        }
     234                        $html .= "<option value=\"".$key."\"".$selected.">".$value."</option>";
     235                    }
     236                    $html .= "</select>";
    224237                break;
    225238            default:
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_form/otw_form.info.php

    r2616902 r2703621  
    55Description:  OTW Form
    66Author: OTWthemes.com
    7 Version: 9.3
     7Version: 9.4
    88Author URI: http://themeforest.net/user/OTWthemes
    99*/
     
    1111$otw_component = array();
    1212$otw_component['name']       = 'OTW Form';
    13 $otw_component['version']    = '9000.3';
     13$otw_component['version']    = '9000.4';
    1414$otw_component['class_name'] = 'OTW_Form';
    1515?>
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_functions/otw_functions.php

    r2616902 r2703621  
    583583                   
    584584                    $value = $data[ $key[0] ][ $key[1] ];
     585                }else{
     586                    $value = $default_value;
    585587                }
    586588            }
     
    589591       
    590592            $value = $data[ $key ];
     593        }else{
     594            $value = $default_value;
    591595        }
    592596       
     
    603607            case 'textarea':
    604608                    $value = sanitize_textarea_field( $value );
     609                break;
     610            case 'integer':
     611                    if( !OTW_Validator::is_unsigned( $value ) ){
     612                        $value = $default_value;
     613                    }
     614                break;
     615            case 'date':
     616                    if( !OTW_Validator::is_date( $value ) ){
     617                        $value = $default_value;
     618                    }
     619                break;
     620            case 'double':
     621                    if( !OTW_Validator::is_double( $value ) ){
     622                        $value = $default_value;
     623                    }
    605624                break;
    606625            default:
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_shortcode/js/otw_shortcode_admin.js

    r2616902 r2703621  
    354354        otw_form_init_fields();
    355355       
    356         var fields = {};
    357        
    358         var code = '';
     356        oSelf.fields = {};
     357       
     358        oSelf.code = '';
    359359       
    360360        oSelf.init_fields();
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_shortcode/otw_shortcode.class.php

    r2616902 r2703621  
    227227               
    228228                if( function_exists( 'register_block_type' ) ){
    229                     register_block_type( 'otw-shortcode-component/otw-shortcode-block', array( 'editor_script' => 'otw-shortcode-block-editor' ) );
     229                    if( !WP_Block_Type_Registry::get_instance()->is_registered( 'otw-shortcode-component/otw-shortcode-block' ) ){
     230                        register_block_type( 'otw-shortcode-component/otw-shortcode-block', array( 'editor_script' => 'otw-shortcode-block-editor' ) );
     231                    }
    230232                }
    231233            }
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_validator/otw_validator.class.php

    r2046559 r2703621  
    4646        return false;
    4747    }
     48   
     49    /**
     50     * check if given string is a date with format YYYY-mm-dd
     51     *
     52     * @param string
     53     *
     54     * @return boolean
     55     */
     56    public static function is_date( $string ){
     57       
     58        if( preg_match( "/^\d{4}\-\d{2}\-\d{2}$/", $string, $matches ) ){
     59            return true;
     60        }
     61        return false;
     62    }
     63   
     64    /**
     65     * check if given string is doubleinterger
     66     *
     67     * @param string
     68     *
     69     * @return boolean
     70     */
     71    public static function is_double( $string ){
     72       
     73        if( is_numeric( $string ) ){
     74            return true;
     75        }
     76        return false;
     77    }
    4878}
  • buttons-shortcode-and-widget/trunk/include/otw_components/otw_validator/otw_validator.info.php

    r2616902 r2703621  
    55Description:  OTW Validator
    66Author: OTWthemes.com
    7 Version: 2.1
     7Version: 2.2
    88Author URI: http://themeforest.net/user/OTWthemes
    99*/
     
    1111$otw_component = array();
    1212$otw_component['name']       = 'OTW Validator';
    13 $otw_component['version']    = '2000.1';
     13$otw_component['version']    = '2000.2';
    1414$otw_component['class_name'] = 'OTW_Validator';
    1515?>
  • buttons-shortcode-and-widget/trunk/otw_content_manager.php

    r2616902 r2703621  
    55Description:  Create buttons. Nice and easy interface. Insert anywhere in your site - page/post editor, sidebars, template files.
    66Author: OTWthemes.com
    7 Version: 1.15
     7Version: 1.16
    88
    99Author URI: http://themeforest.net/user/OTWthemes
  • buttons-shortcode-and-widget/trunk/readme.txt

    r2616902 r2703621  
    44Tags: buttons, shortcode, widgets, button, WYSIWYG editor, widget, sidebar
    55Requires at least: 3.6
    6 Tested up to: 5.8.1
    7 Stable tag: 1.15
     6Tested up to: 5.9
     7Stable tag: 1.16
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8282== Changelog ==
    8383
     84= 1.16 =
     85
     86* Fixed: Validation for already registered block editors
     87* Fixed: Dynamic shortcode fields
     88* Updated: Core components
     89
    8490= 1.15 =
    8591
Note: See TracChangeset for help on using the changeset viewer.