本文整理汇总了PHP中Redux::setExtensions方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux::setExtensions方法的具体用法?PHP Redux::setExtensions怎么用?PHP Redux::setExtensions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redux
的用法示例。
在下文中一共展示了Redux::setExtensions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
if (class_exists('Redux')) {
$opt_name = 'pinnacle';
Redux::setExtensions($opt_name, dirname(__FILE__) . '/extensions/');
}
示例2: getInstanceExtensions
public static function getInstanceExtensions($opt_name, $instance = array())
{
if (!empty(self::$uses_extensions[$opt_name])) {
return;
}
if (empty($instance)) {
$instance = ReduxFrameworkInstances::get_instance($opt_name);
}
if (empty($instance) || empty($instance->extensions)) {
return;
}
foreach ($instance->extensions as $name => $extension) {
if ($name == "widget_areas") {
$new = new Redux_Widget_Areas($instance);
}
if (isset(self::$uses_extensions[$opt_name][$name])) {
continue;
}
if (isset($extension->extension_dir)) {
Redux::setExtensions($opt_name, str_replace($name, '', $extension->extension_dir));
} else {
if (isset($extension->_extension_dir)) {
Redux::setExtensions($opt_name, str_replace($name, '', $extension->_extension_dir));
}
}
}
}
示例3: dirname
<?php
// All extensions placed within the extensions directory will be auto-loaded for your Redux instance.
Redux::setExtensions('redux_builder_burocrate', dirname(__FILE__) . '/extensions/');
// Any custom extension configs should be placed within the configs folder.
if (file_exists(dirname(__FILE__) . '/configs/')) {
$files = glob(dirname(__FILE__) . '/configs/*.php');
if (!empty($files)) {
foreach ($files as $file) {
include $file;
}
}
}
示例4: register_activation_hook
register_activation_hook(__FILE__, 'add_roles_on_plugin_activation');
function vbs_load_plugin_textdomain()
{
load_plugin_textdomain('vbs', FALSE, basename(dirname(__FILE__)) . '/languages/');
}
add_action('plugins_loaded', 'vbs_load_plugin_textdomain');
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'ajaxFunctionMethod') {
do_action('wp_ajax_' . $_REQUEST['action']);
do_action('wp_ajax_nopriv_' . $_REQUEST['action']);
}
// Include the Redux files
if (!class_exists('ReduxFramework') && file_exists(dirname(__FILE__) . '/admin/framework.php')) {
require_once PLUGIN_DIR . 'admin/framework.php';
}
require_once dirname(__FILE__) . '/admin/admin-config.php';
Redux::setExtensions('booking', dirname(__FILE__) . '/admin/vendor_support');
if (!class_exists('RW_Meta_Box')) {
require_once 'include/meta-box/meta-box.php';
}
include 'include/custom-post-types.php';
include 'include/meta-boxes.php';
include 'include/shortcodes.php';
include 'include/calculator.php';
include 'include/form_handler.php';
include 'include/helper.php';
include 'include/email.php';
// TGM activation class
require_once PLUGIN_DIR . 'include/tgm/tgm-init.php';
add_action('admin_enqueue_scripts', 'add_admin_scripts', 10, 1);
function add_admin_scripts($hook)
{