Plugin Directory

Changeset 1919706


Ignore:
Timestamp:
08/04/2018 08:53:26 AM (8 years ago)
Author:
velathemes
Message:

version 1.0.8

Location:
vela-companion/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • vela-companion/trunk/assets/js/admin.js

    r1916675 r1919706  
    197197                            action: 'vela_import_elementor'
    198198                        },
    199                         dataType:"json",
     199                    //  dataType:"json",
    200200                        type: 'POST',
    201201                        success: function ( data ) {
  • vela-companion/trunk/inc/pageMetabox/helpers/vela_Meta_Box_types.php

    r1902195 r1919706  
    513513    public function colorpicker() {
    514514        $meta_value = $this->field->escaped_value();
    515         $hex_color = '(([a-fA-F0-9]){3}){1,2}$';
     515        /*$hex_color = '(([a-fA-F0-9]){3}){1,2}$';
    516516        if ( preg_match( '/^' . $hex_color . '/i', $meta_value ) ) // Value is just 123abc, so prepend #.
    517517            $meta_value = '#' . $meta_value;
    518518        elseif ( ! preg_match( '/^#' . $hex_color . '/i', $meta_value ) ) // Value doesn't match #123abc, so sanitize to just #.
    519             $meta_value = "#";
    520 
    521         return $this->input( array( 'class' => 'cmb_colorpicker cmb_text_small', 'value' => $meta_value ) );
     519            $meta_value = "#";*/
     520
     521        return $this->input( array( 'class' => 'cmb_colorpicker cmb_text_small color-picker', 'data-alpha' => 'true', 'value' => $meta_value ) );
    522522    }
    523523
  • vela-companion/trunk/inc/pageMetabox/init.php

    r1902195 r1919706  
    11<?php
    2 /*
    3 Script Name:  Custom Metaboxes and Fields
    4 Contributors: WebDevStudios (@webdevstudios / webdevstudios.com)
    5               Justin Sternberg (@jtsternberg / dsgnwrks.pro)
    6               Jared Atchison (@jaredatch / jaredatchison.com)
    7               Bill Erickson (@billerickson / billerickson.net)
    8               Andrew Norcross (@norcross / andrewnorcross.com)
    9 Description:  This will create metaboxes with custom fields that will blow your mind.
    10 Version:      1.2.0
    11 */
    12 
    13 /**
    14  * Released under the GPL license
    15  * http://www.opensource.org/licenses/gpl-license.php
    16  *
    17  * This is an add-on for WordPress
    18  * http://wordpress.org/
    19  *
    20  * **********************************************************************
    21  * This program is free software; you can redistribute it and/or modify
    22  * it under the terms of the GNU General Public License as published by
    23  * the Free Software Foundation; either version 2 of the License, or
    24  * (at your option) any later version.
    25  *
    26  * This program is distributed in the hope that it will be useful,
    27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    29  * GNU General Public License for more details.
    30  * **********************************************************************
    31  */
    32 
    33 /************************************************************************
    34         You should not edit the code below or things might explode!
    35 *************************************************************************/
    362
    373// Autoload helper classes
     
    5218
    5319    /**
    54      * Current version number
    55      * @var   string
    56      
     20     * Current version number   
    5721     */
    5822    const CMB_VERSION = '1.2.0';
     
    6024    /**
    6125     * Metabox Config array
    62      * @var   array
    63      * @since 0.9.0
    6426     */
    6527    protected $_meta_box;
     
    6830     * Metabox Defaults
    6931     * @var   array
    70      * @since 1.0.1
    7132     */
    7233    protected static $mb_defaults = array(
     
    8647     * Metabox Form ID
    8748     * @var   string
    88      * @since 0.9.4
    8949     */
    9050    protected $form_id = 'post';
     
    12181     * Whether CMB nonce has been added to the page. (oly add once)
    12282     * @var   bool
    123      * @since 1.2.0
    12483     */
    12584    protected static $nonce_added = false;
     
    142101     * List of fields that are changed/updated on save
    143102     * @var   array
    144      * @since 1.1.0
    145103     */
    146104    protected static $updated = array();
     
    256214                wp_register_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), self::CMB_VERSION );
    257215                wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array(
    258                     'clear'         => __( 'Clear' ),
    259                     'defaultString' => __( 'Default' ),
    260                     'pick'          => __( 'Select Color' ),
    261                     'current'       => __( 'Current Color' ),
     216                    'clear'         => __( 'Clear', 'vela-companion' ),
     217                    'defaultString' => __( 'Default', 'vela-companion' ),
     218                    'pick'          => __( 'Select Color', 'vela-companion' ),
     219                    'current'       => __( 'Current Color', 'vela-companion' ),
    262220                ) );
    263221            }
     
    278236            'new_admin_style' => version_compare( $wp_version, '3.7', '>' ),
    279237            'object_type'     => self::get_object_type(),
    280             'upload_file'     => 'Use this file',
    281             'remove_image'    => 'Remove Image',
    282             'remove_file'     => 'Remove',
    283             'file'            => 'File:',
    284             'download'        => 'Download',
     238            'upload_file'     => __( 'Use this file', 'vela-companion' ),
     239            'remove_image'    => __( 'Remove Image', 'vela-companion' ),
     240            'remove_file'     => __( 'Remove', 'vela-companion' ),
     241            'file'            => __( 'File:', 'vela-companion' ),
     242            'download'        => __( 'Download', 'vela-companion' ),
    285243            'ajaxurl'         => admin_url( '/admin-ajax.php' ),
    286244            'up_arrow'        => '[ ↑ ]&nbsp;',
     
    288246            'check_toggle'    => __( 'Select / Deselect All', 'vela-companion' ),
    289247        ) ) );
     248       
     249        wp_enqueue_script( 'wp-color-picker-alpha', VELA_META_BOX_URL . 'js/wp-color-picker-alpha.js', array( 'wp-color-picker' ), '', '' );
    290250
    291251        wp_register_style( 'cmb-styles', VELA_META_BOX_URL . 'style'. $min .'.css', $styles );
  • vela-companion/trunk/inc/pageMetabox/options.php

    r1910113 r1919706  
    133133        }else{
    134134   
     135    $menus = array( esc_html__( 'Default', 'vela-companion' ) );
     136    $get_menus  = get_terms( 'nav_menu', array( 'hide_empty' => true ) );
     137    foreach ( $get_menus as $menu) {
     138        $menus[$menu->term_id] = $menu->name;
     139    }
     140   
    135141    $meta_boxes['theme_options_metabox'] = array(
    136142        'id'         => 'theme_options_metabox',
     
    140146        'priority'   => 'high',
    141147        'fields'     => array(
     148           
     149            array(
     150                'name'    => __( 'Custom Menu', 'vela-companion' ),
     151                'desc'    => '',
     152                'id'      => $prefix . 'custom_menu',
     153                'type'    => 'select',
     154                'default' => '',
     155                'options' => $menus,
     156            ),
    142157           
    143158            array(
  • vela-companion/trunk/inc/templates-importer/templates-importer.php

    r1916675 r1919706  
    264264        $pathinfo = pathinfo($template_url);
    265265       
    266         $elementor = new Elementor\TemplateLibrary\Source_Local;
    267        
     266        $elementor = new \Elementor\TemplateLibrary\Source_Local;
     267
    268268        $result = $elementor->import_template($pathinfo['basename'], $template);
    269269        unlink( $template );
    270        
    271270
    272271        if(isset($result->template_id)){
     
    358357       
    359358        if($ajax == true){
    360             echo @json_encode( array('redirect_url'=>$redirect_url) );
     359            echo json_encode( array("redirect_url"=>$redirect_url) );
    361360            exit(0);
    362361        }else{
  • vela-companion/trunk/readme.txt

    r1916675 r1919706  
    3333== Changelog ==
    3434
     35= 1.0.8 =
     36* Fixed undefined method for old elementor versions.
     37
    3538= 1.0.7 =
    3639* Remove the automatic setting of the front page when importing the template
  • vela-companion/trunk/vela-companion.php

    r1916675 r1919706  
    55    Author: VelaThemes
    66    Author URI: https://velathemes.com/
    7     Version: 1.0.7
     7    Version: 1.0.8
    88    Text Domain: vela-companion
    99    Domain Path: /languages
     
    1414
    1515define( 'VELA_COMPANION_DIR',  plugin_dir_path( __FILE__ ) );
    16 define( 'VELA_COMPANION_VER',  '1.0.7' );
     16define( 'VELA_COMPANION_VER',  '1.0.8' );
    1717
    1818require_once 'inc/widget-recent-posts.php';
     
    7878            add_action( 'wp_ajax_cactus_contact', array(&$this ,'send_email'));
    7979            add_action( 'wp_ajax_nopriv_cactus_contact', array(&$this ,'send_email'));
    80 
     80           
     81            add_filter( 'vela_custom_menu', array( $this, 'custom_menu' ) );
    8182           
    8283            //add_action( 'customize_controls_init', array( &$this,'customize_controls_enqueue') );
    8384
    8485        }
     86       
    8587   
    8688    /**
     
    9092        //wp_enqueue_script( 'vela_companion_customizer_controls',  plugins_url('/assets/js/customizer.js', __FILE__), '', '1.0.0', true );
    9193           
    92     }   
    93 
     94    }
     95   
     96    /**
     97     * Custom menu
     98     *
     99     */
     100    public function custom_menu( $menu ) {
     101       
     102        global $post;
     103        if( !isset( $post->ID ) )
     104            return '';
     105           
     106        if ( $meta = get_post_meta( $post->ID, '_vela_custom_menu', true ) ) {
     107            $menu = $meta;
     108        }
     109       
     110            return $menu;
     111
     112
     113    }
    94114
    95115    function plugin_activate( $network_wide ) {
     
    693713        $i18n = array();
    694714       
    695         wp_enqueue_script( 'owl-carousel', plugins_url('assets/vendor/owl-carousel/js/owl.carousel.min.js', __FILE__), array( 'jquery' ), null, true);
    696         wp_enqueue_script( 'jquery-cookie', plugins_url('assets/vendor/jquery.cookie.min.js', __FILE__), array( 'jquery' ), null, true);
    697         wp_enqueue_script( 'mixitup', plugins_url('assets/vendor/mixitup/mixitup.min.js', __FILE__), array( 'jquery' ), null, true);
    698        
    699         wp_enqueue_script( 'vela-companion-front', plugins_url('assets/js/front.js', __FILE__),array('jquery'),VELA_COMPANION_VER,true);
     715        wp_enqueue_script( 'owl-carousel', plugins_url('assets/vendor/owl-carousel/js/owl.carousel.min.js', __FILE__), array( 'jquery' ), null, false);
     716        wp_enqueue_script( 'jquery-cookie', plugins_url('assets/vendor/jquery.cookie.min.js', __FILE__), array( 'jquery' ), null, false);
     717        wp_enqueue_script( 'mixitup', plugins_url('assets/vendor/mixitup/mixitup.min.js', __FILE__), array( 'jquery' ), null, false);
     718       
     719        wp_enqueue_script( 'vela-companion-front', plugins_url('assets/js/front.js', __FILE__),array('jquery'),VELA_COMPANION_VER,false);
    700720       
    701721        wp_enqueue_style( 'owl-carousel', plugins_url('assets/vendor/owl-carousel/css/owl.carousel.css', __FILE__));
Note: See TracChangeset for help on using the changeset viewer.