本文整理汇总了PHP中wpgrade::corepath方法的典型用法代码示例。如果您正苦于以下问题:PHP wpgrade::corepath方法的具体用法?PHP wpgrade::corepath怎么用?PHP wpgrade::corepath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpgrade
的用法示例。
在下文中一共展示了wpgrade::corepath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_content
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>';
}
}
示例2: render_content
/**
* 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>';
}
}
示例3: defined
<?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);