本文整理汇总了PHP中Options_Framework_Admin::menu_settings方法的典型用法代码示例。如果您正苦于以下问题:PHP Options_Framework_Admin::menu_settings方法的具体用法?PHP Options_Framework_Admin::menu_settings怎么用?PHP Options_Framework_Admin::menu_settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Options_Framework_Admin
的用法示例。
在下文中一共展示了Options_Framework_Admin::menu_settings方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: optionsframework_media_scripts
/**
* Enqueue scripts for file uploader
*/
function optionsframework_media_scripts($hook)
{
$menu = Options_Framework_Admin::menu_settings();
if (substr($hook, -strlen($menu['menu_slug'])) !== $menu['menu_slug']) {
return;
}
if (function_exists('wp_enqueue_media')) {
wp_enqueue_media();
}
wp_register_script('of-media-uploader', plugin_dir_url(dirname(__FILE__)) . 'js/media-uploader.js', array('jquery'), Options_Framework::VERSION);
wp_enqueue_script('of-media-uploader');
wp_localize_script('of-media-uploader', 'optionsframework_l10n', array('upload' => __('Upload', 'options-framework'), 'remove' => __('Remove', 'options-framework')));
}
示例2: optionsframework_media_scripts
/**
* Enqueue scripts for file uploader
*/
function optionsframework_media_scripts($hook)
{
$menu = Options_Framework_Admin::menu_settings();
if ('appearance_page_' . $menu['menu_slug'] != $hook) {
return;
}
if (function_exists('wp_enqueue_media')) {
wp_enqueue_media();
}
wp_register_script('of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY . 'js/media-uploader.js', array('jquery'), Options_Framework::VERSION);
wp_enqueue_script('of-media-uploader');
wp_localize_script('of-media-uploader', 'optionsframework_l10n', array('upload' => 'Upload', 'remove' => 'Remove'));
}
示例3: optionsframework_media_scripts
/**
* Enqueue scripts for file uploader
*/
function optionsframework_media_scripts($hook)
{
$menu = Options_Framework_Admin::menu_settings();
if (substr($hook, -strlen($menu['menu_slug'])) !== $menu['menu_slug']) {
return;
}
if (function_exists('wp_enqueue_media')) {
wp_enqueue_media();
}
wp_register_script('of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY . 'js/media-uploader.js', array('jquery'), Options_Framework::VERSION);
wp_enqueue_script('of-media-uploader');
wp_localize_script('of-media-uploader', 'optionsframework_l10n', array('upload' => __('Upload', 'accesspress-store'), 'remove' => __('Remove', 'accesspress-store')));
}
示例4: optionsframework_media_scripts
/**
* Enqueue scripts for file uploader
*/
function optionsframework_media_scripts($hook)
{
$menu = Options_Framework_Admin::menu_settings();
if (substr($hook, -strlen($menu['menu_slug'])) !== $menu['menu_slug']) {
return;
}
if (function_exists('wp_enqueue_media')) {
wp_enqueue_media();
}
wp_register_script('of-media-uploader', get_template_directory_uri() . '/lib/settings_panel/js/media-uploader.js', array('jquery'), Options_Framework::VERSION);
wp_enqueue_script('of-media-uploader');
wp_localize_script('of-media-uploader', 'optionsframework_l10n', array('upload' => __('Upload', 'options-framework'), 'remove' => __('Remove', 'options-framework')));
}