本文整理汇总了PHP中Redux_Helpers::get_extension_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux_Helpers::get_extension_url方法的具体用法?PHP Redux_Helpers::get_extension_url怎么用?PHP Redux_Helpers::get_extension_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redux_Helpers
的用法示例。
在下文中一共展示了Redux_Helpers::get_extension_url方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Class Constructor. Defines the args for the extions class
*
* @since 1.0.0
* @access public
*
* @param array $sections Panel sections.
* @param array $args Class constructor arguments.
* @param array $extra_tabs Extra panel tabs.
*
* @return void
*/
public function __construct($parent)
{
$this->parent = $parent;
$this->upload_dir = ReduxFramework::$_upload_dir . 'advanced-customizer/';
$this->upload_url = ReduxFramework::$_upload_url . 'advanced-customizer/';
//add_action('wp_head', array( $this, '_enqueue_new' ));
if ($parent->args['customizer'] == false) {
return;
}
// Override the ReduxCore class
add_filter("redux/extension/{$this->parent->args['opt_name']}/customizer", array($this, 'remove_core_customizer_class'));
global $pagenow, $wp_customize;
if (!isset($wp_customize) && $pagenow !== "customize.php" && $pagenow !== "admin-ajax.php") {
return;
}
if ($pagenow !== "customize.php" && $pagenow !== "admin-ajax.php" && !isset($GLOBALS['wp_customize'])) {
//return;
}
if (empty($this->_extension_dir)) {
$this->_extension_dir = Redux_Helpers::get_extension_dir(dirname(__FILE__));
$this->_extension_url = Redux_Helpers::get_extension_url(dirname(__FILE__));
}
self::get_post_values();
// Create defaults array
$defaults = array();
/*
customize_controls_init
customize_controls_enqueue_scripts
customize_controls_print_styles
customize_controls_print_scripts
customize_controls_print_footer_scripts
*/
//add_action('customize_save', );
if (isset($_POST['wp_customize']) && $_POST['wp_customize'] == "on") {
$this->parent->args['customizer_only'] = true;
}
if (isset($_POST['wp_customize']) && $_POST['wp_customize'] == "on" && isset($_POST['customized']) && !empty($_POST['customized']) && !isset($_POST['action'])) {
add_action("redux/options/{$this->parent->args['opt_name']}/options", array($this, '_override_values'), 100);
}
add_action('customize_register', array($this, '_register_customizer_controls'));
// Create controls
add_action('wp_head', array($this, 'customize_preview_init'));
//add_action( 'customize_save', array( $this, 'customizer_save_before' ) ); // Before save
add_action('customize_save_after', array(&$this, 'customizer_save_after'));
// After save
// Add global controls CSS file
add_action('customize_controls_print_scripts', array($this, 'enqueue_controls_css'));
add_action('customize_controls_init', array($this, 'enqueue_panel_css'));
//add_action( 'wp_enqueue_scripts', array( &$this, '_enqueue_previewer_css' ) ); // Enqueue previewer css
//add_action( 'wp_enqueue_scripts', array( &$this, '_enqueue_previewer_js' ) ); // Enqueue previewer javascript
//add_action( "wp_footer", array( $this, '_enqueue_new' ), 100 );
//$this->_enqueue_new();
}