public function render_content() { $field = search_multi($this->ReduxFramework->sections, 'id', $this->option_key); // the key is always unique so there will be only one $field = $field[0]; if (!isset($field['name_suffix'])) { $field['name_suffix'] = ""; } if (!isset($field['default'])) { $field['default'] = array(); } $field['custom_data'] = $this->get_link(); $field_class = 'ReduxFramework_customizer_checkbox'; if (!class_exists($field_class)) { $class_file = apply_filters('redux-typeclass-load', '/inc/fields/checkbox/field_checkbox.php', $field_class); if ($class_file === 'inc/fields/checkbox/field_checkbox.php') { /* for PRO users! - * @noinspection PhpIncludeInspection */ require_once wpgrade::corepath() . 'vendor/redux3/' . $class_file; } } $value = wpgrade::option($field['id'], 0); if (class_exists($field_class) && method_exists($field_class, 'render')) { $enqueue = new $field_class($field, $value, $this->ReduxFramework); // $enqueue->enqueue(); echo "<label>" . "<span class=\"customize-control-title\">" . $field['title'] . "</span>" . "</label>"; echo '<div class="redux-container-' . $this->type . '">'; echo $enqueue->render(); echo '<div>'; } }
/** * A custom render for sliders in customizer panel */ public function render_content() { $field = search_multi($this->ReduxFramework->sections, 'id', $this->option_key); // the key is always unique so there will be only one $field = $field[0]; if (!isset($field['name_suffix'])) { $field['name_suffix'] = ""; } if (!isset($field['default'])) { $field['default'] = array(); } $field['custom_data'] = $this->get_link(); $field_class = 'ReduxFramework_customizer_background'; if (!class_exists($field_class)) { $class_file = apply_filters('redux-typeclass-load', '/inc/fields/background/field_background.php', $field_class); if ($class_file === '/inc/fields/background/field_background.php') { /** @noinspection PhpIncludeInspection */ require_once wpgrade::corepath() . 'vendor/redux3/' . $class_file; } } $value = wpgrade::option($field['id'], $field['default']); // get wordpress default labels $this->json['button_labels'] = array('select' => __('Select Image'), 'change' => __('Change Image'), 'remove' => __('Remove'), 'default' => __('Default'), 'placeholder' => __('No image selected'), 'frame_title' => __('Select Image'), 'frame_button' => __('Choose Image')); if (class_exists($field_class) && method_exists($field_class, 'render')) { $field_object = new $field_class($field, $value, $this->ReduxFramework); // $enqueue->enqueue(); echo "<label>" . "<span class=\"customize-control-title\">" . $field['title'] . "</span>" . "</label>"; // echo '<div class="redux-container-'. $this->type . '" >'; echo $field_object->render(); // echo '<div>'; } }
<?php defined('ABSPATH') or die; /* for PRO users! - This file is property of Pixel Grade Media. You may NOT copy, or redistribute * it. Please see the license that came with your copy for more information. */ include_once wpgrade::corepath() . 'vendor/envato-wtl/class-envato-protected-api' . EXT; include_once wpgrade::corepath() . 'vendor/envato-wtl/class-envato-backup' . EXT; /* for PRO users! - * * @package wpgrade * @category core * @author Pixel Grade Team * @copyright (c) 2013, Pixel Grade Media */ class WPGradeAjaxUpgrader { /* for PRO users! - * * @var Envato_Protected_API */ protected $api = null; /* for PRO users! - * * @var array */ protected $errors = null; /* for PRO users! - * * ... */ function __construct($username = null, $api_key = null) { if ($username !== null) { $this->api = new Envato_Protected_API($username, $api_key);