Changeset 1919706
- Timestamp:
- 08/04/2018 08:53:26 AM (8 years ago)
- Location:
- vela-companion/trunk
- Files:
-
- 7 edited
-
assets/js/admin.js (modified) (1 diff)
-
inc/pageMetabox/helpers/vela_Meta_Box_types.php (modified) (1 diff)
-
inc/pageMetabox/init.php (modified) (10 diffs)
-
inc/pageMetabox/options.php (modified) (2 diffs)
-
inc/templates-importer/templates-importer.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
vela-companion.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vela-companion/trunk/assets/js/admin.js
r1916675 r1919706 197 197 action: 'vela_import_elementor' 198 198 }, 199 dataType:"json",199 // dataType:"json", 200 200 type: 'POST', 201 201 success: function ( data ) { -
vela-companion/trunk/inc/pageMetabox/helpers/vela_Meta_Box_types.php
r1902195 r1919706 513 513 public function colorpicker() { 514 514 $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}$'; 516 516 if ( preg_match( '/^' . $hex_color . '/i', $meta_value ) ) // Value is just 123abc, so prepend #. 517 517 $meta_value = '#' . $meta_value; 518 518 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 ) ); 522 522 } 523 523 -
vela-companion/trunk/inc/pageMetabox/init.php
r1902195 r1919706 1 1 <?php 2 /*3 Script Name: Custom Metaboxes and Fields4 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.011 */12 13 /**14 * Released under the GPL license15 * http://www.opensource.org/licenses/gpl-license.php16 *17 * This is an add-on for WordPress18 * http://wordpress.org/19 *20 * **********************************************************************21 * This program is free software; you can redistribute it and/or modify22 * it under the terms of the GNU General Public License as published by23 * the Free Software Foundation; either version 2 of the License, or24 * (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 of28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the29 * GNU General Public License for more details.30 * **********************************************************************31 */32 33 /************************************************************************34 You should not edit the code below or things might explode!35 *************************************************************************/36 2 37 3 // Autoload helper classes … … 52 18 53 19 /** 54 * Current version number 55 * @var string 56 20 * Current version number 57 21 */ 58 22 const CMB_VERSION = '1.2.0'; … … 60 24 /** 61 25 * Metabox Config array 62 * @var array63 * @since 0.9.064 26 */ 65 27 protected $_meta_box; … … 68 30 * Metabox Defaults 69 31 * @var array 70 * @since 1.0.171 32 */ 72 33 protected static $mb_defaults = array( … … 86 47 * Metabox Form ID 87 48 * @var string 88 * @since 0.9.489 49 */ 90 50 protected $form_id = 'post'; … … 121 81 * Whether CMB nonce has been added to the page. (oly add once) 122 82 * @var bool 123 * @since 1.2.0124 83 */ 125 84 protected static $nonce_added = false; … … 142 101 * List of fields that are changed/updated on save 143 102 * @var array 144 * @since 1.1.0145 103 */ 146 104 protected static $updated = array(); … … 256 214 wp_register_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), self::CMB_VERSION ); 257 215 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' ), 262 220 ) ); 263 221 } … … 278 236 'new_admin_style' => version_compare( $wp_version, '3.7', '>' ), 279 237 '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' ), 285 243 'ajaxurl' => admin_url( '/admin-ajax.php' ), 286 244 'up_arrow' => '[ ↑ ] ', … … 288 246 'check_toggle' => __( 'Select / Deselect All', 'vela-companion' ), 289 247 ) ) ); 248 249 wp_enqueue_script( 'wp-color-picker-alpha', VELA_META_BOX_URL . 'js/wp-color-picker-alpha.js', array( 'wp-color-picker' ), '', '' ); 290 250 291 251 wp_register_style( 'cmb-styles', VELA_META_BOX_URL . 'style'. $min .'.css', $styles ); -
vela-companion/trunk/inc/pageMetabox/options.php
r1910113 r1919706 133 133 }else{ 134 134 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 135 141 $meta_boxes['theme_options_metabox'] = array( 136 142 'id' => 'theme_options_metabox', … … 140 146 'priority' => 'high', 141 147 '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 ), 142 157 143 158 array( -
vela-companion/trunk/inc/templates-importer/templates-importer.php
r1916675 r1919706 264 264 $pathinfo = pathinfo($template_url); 265 265 266 $elementor = new Elementor\TemplateLibrary\Source_Local;267 266 $elementor = new \Elementor\TemplateLibrary\Source_Local; 267 268 268 $result = $elementor->import_template($pathinfo['basename'], $template); 269 269 unlink( $template ); 270 271 270 272 271 if(isset($result->template_id)){ … … 358 357 359 358 if($ajax == true){ 360 echo @json_encode( array('redirect_url'=>$redirect_url) );359 echo json_encode( array("redirect_url"=>$redirect_url) ); 361 360 exit(0); 362 361 }else{ -
vela-companion/trunk/readme.txt
r1916675 r1919706 33 33 == Changelog == 34 34 35 = 1.0.8 = 36 * Fixed undefined method for old elementor versions. 37 35 38 = 1.0.7 = 36 39 * Remove the automatic setting of the front page when importing the template -
vela-companion/trunk/vela-companion.php
r1916675 r1919706 5 5 Author: VelaThemes 6 6 Author URI: https://velathemes.com/ 7 Version: 1.0. 77 Version: 1.0.8 8 8 Text Domain: vela-companion 9 9 Domain Path: /languages … … 14 14 15 15 define( 'VELA_COMPANION_DIR', plugin_dir_path( __FILE__ ) ); 16 define( 'VELA_COMPANION_VER', '1.0. 7' );16 define( 'VELA_COMPANION_VER', '1.0.8' ); 17 17 18 18 require_once 'inc/widget-recent-posts.php'; … … 78 78 add_action( 'wp_ajax_cactus_contact', array(&$this ,'send_email')); 79 79 add_action( 'wp_ajax_nopriv_cactus_contact', array(&$this ,'send_email')); 80 80 81 add_filter( 'vela_custom_menu', array( $this, 'custom_menu' ) ); 81 82 82 83 //add_action( 'customize_controls_init', array( &$this,'customize_controls_enqueue') ); 83 84 84 85 } 86 85 87 86 88 /** … … 90 92 //wp_enqueue_script( 'vela_companion_customizer_controls', plugins_url('/assets/js/customizer.js', __FILE__), '', '1.0.0', true ); 91 93 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 } 94 114 95 115 function plugin_activate( $network_wide ) { … … 693 713 $i18n = array(); 694 714 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); 700 720 701 721 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.