本文整理汇总了PHP中get_theme_option函数的典型用法代码示例。如果您正苦于以下问题:PHP get_theme_option函数的具体用法?PHP get_theme_option怎么用?PHP get_theme_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_theme_option函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: register_taxonomies
static function register_taxonomies()
{
$post_types = array('object');
if (get_theme_option('enable_taxonomy')) {
register_taxonomy('object_type', $post_types, array('hierarchical' => true, 'labels' => self::get_taxonomy_label(), 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => get_theme_option('taxonomy_url'))));
}
}
开发者ID:cabelotaina,项目名称:redelivre,代码行数:7,代码来源:objects.php
示例2: form
function form($instance)
{
$sidebar = $instance['sidebar'];
$sidebars = get_theme_option('general', 'sidebars');
$sidebars = explode(';', $sidebars);
if (count($sidebars) != 0) {
?>
<p>
<label for="<?php
echo $this->get_field_id('sidebar');
?>
"><?php
_e('Sidebar', THEME_ADMIN_LANG_DOMAIN);
?>
</label>
<select name="<?php
echo $this->get_field_name('sidebar');
?>
" id="<?php
echo $this->get_field_id('sidebar');
?>
">
<?php
foreach ($sidebars as $sider) {
$siderr = strtolower(str_replace(' ', '', $sider));
echo '<option value="' . $siderr . '" ' . selected($sidebar, $siderr, false) . '>' . $sider . '</option>';
}
?>
</select>
</p>
<?php
} else {
echo '<p>' . __('you do not have any sidebars defined please define some in developer options page', THEME_ADMIN_LANG_DOMAIN) . '</p>';
}
}
开发者ID:shieldsdesignstudio,项目名称:forefield,代码行数:35,代码来源:the-sidebars.php
示例3: testConfigureThemeWithNoLogoFileAndNoPreviousLogoFile
public function testConfigureThemeWithNoLogoFileAndNoPreviousLogoFile()
{
$themeName = self::THEME;
$this->assertEquals('', (string) get_theme_option('logo', $themeName));
// specify the files array for the post
$_FILES = array('logo' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0), 'header_background' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0));
// specify the theme options for the post
$themeOptions = array('display_featured_item' => '1', 'display_featured_collection' => '1', 'display_featured_exhibit' => '1', 'homepage_recent_items' => '', 'homepage_text' => '', 'footer_text' => '', 'display_footer_copyright' => '0');
$csrf = new Zend_Form_Element_Hash('theme_config_csrf');
$csrf->initCsrfToken();
// specify other post data
$otherPostData = array('hidden_file_logo' => '', 'hidden_file_header_background' => '', 'MAX_FILE_SIZE' => '33554432', 'submit' => 'Save Changes', 'theme_config_csrf' => $csrf->getHash());
// set the the post data
$post = array_merge($themeOptions, $otherPostData);
$this->getRequest()->setParam('name', $themeName);
$this->getRequest()->setPost($post);
$this->getRequest()->setMethod('POST');
// dispatch the controller action
$this->dispatch('themes/config');
$actualOptions = Theme::getOptions(self::THEME);
$this->assertArrayNotHasKey('theme_config_csrf', $actualOptions);
foreach ($themeOptions as $name => $value) {
$this->assertArrayHasKey($name, $actualOptions);
$this->assertEquals($actualOptions[$name], $value, "Option '{$name}' was not correctly set.");
}
// verify that logo is empty
$this->assertEmpty(get_theme_option('logo', $themeName));
}
开发者ID:emhoracek,项目名称:Omeka,代码行数:28,代码来源:ThemesControllerTest.php
示例4: dez_custom_google_font
function dez_custom_google_font()
{
$safe_font = array("Arial", "Arial Black", "Verdana", "Tahoma", "Trebuchet MS", "Times New Roman", "Helvetica Neue", "Helvetica", "Lucida Grande", "Courier New", "Lucida Console", "Impact", "Georgia", "Palatino Linotype");
$http = !empty($_SERVER['HTTPS']) ? "https" : "http";
$un_bodytype = get_theme_option('body_font');
$un_headtype = get_theme_option('headline_font');
$un_navtype = get_theme_option('navigation_font');
$bodytype = str_replace(' ', '+', get_theme_option('body_font'));
$headtype = str_replace(' ', '+', get_theme_option('headline_font'));
$navtype = str_replace(' ', '+', get_theme_option('navigation_font'));
$font_var = '100,200,300,400,600,700,900,100italic,200italic,300italic,400italic,600italic,700italic,900italic';
$font_subset = 'latin,cyrillic-ext,latin-ext,cyrillic,greek,greek-ext,vietnamese';
if ($un_bodytype == "" || $un_bodytype == "Choose a font" || in_array($un_bodytype, $safe_font)) {
} else {
wp_register_style('body_gwf', $http . "://fonts.googleapis.com/css?family=" . $bodytype . ":" . $font_var . "&subset=" . $font_subset);
wp_enqueue_style('body_gwf');
}
if ($un_headtype == "" || $un_headtype == "Choose a font" || in_array($un_headtype, $safe_font)) {
} else {
wp_register_style('headline_gwf', $http . "://fonts.googleapis.com/css?family=" . $headtype . ":" . $font_var . "&subset=" . $font_subset);
wp_enqueue_style('headline_gwf');
}
if ($un_navtype == "" || $un_navtype == "Choose a font" || in_array($un_navtype, $safe_font)) {
} else {
wp_register_style('nav_gwf', $http . "://fonts.googleapis.com/css?family=" . $navtype . ":" . $font_var . "&subset=" . $font_subset);
wp_enqueue_style('nav_gwf');
}
}
开发者ID:jrbranaa,项目名称:pitchperspectives,代码行数:28,代码来源:fonts-functions.php
示例5: testWithThemeName
public function testWithThemeName()
{
set_theme_option('logo', 'jammy.png', 'whatever');
$this->assertEquals('jammy.png', get_theme_option('logo', 'whatever'));
set_theme_option('new_option', 'hoohas', 'whatever');
$this->assertEquals('hoohas', get_theme_option('new_option', 'whatever'));
}
开发者ID:emhoracek,项目名称:Omeka,代码行数:7,代码来源:SetThemeOptionTest.php
示例6: mapasdevista_admin_init
function mapasdevista_admin_init()
{
global $pagenow;
if ($pagenow === "post.php" || $pagenow === "post-new.php" || isset($_GET['page']) && $_GET['page'] === "mapasdevista_maps") {
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-resizable');
wp_enqueue_script('jquery-ui-dialog');
// api do google maps versao 3 direto
$googleapikey = get_theme_option('google_key');
$googleapikey = $googleapikey ? "&key={$googleapikey}" : '';
wp_enqueue_script('google-maps-v3', 'http://maps.google.com/maps/api/js?sensor=false' . $googleapikey);
wp_enqueue_script('openlayers', 'http://openlayers.org/api/OpenLayers.js');
wp_enqueue_script('mapstraction', mapasdevista_get_baseurl() . '/js/mxn/mxn-min.js');
wp_enqueue_script('mapstraction-core', mapasdevista_get_baseurl() . '/js/mxn/mxn.core-min.js');
wp_enqueue_script('mapstraction-googlev3', mapasdevista_get_baseurl() . '/js/mxn/mxn.googlev3.core-min.js');
wp_enqueue_script('mapstraction-openlayers', mapasdevista_get_baseurl() . '/js/mxn/mxn.openlayers.core-min.js');
}
if (isset($_GET['page']) && $_GET['page'] === "mapasdevista_theme_page") {
wp_enqueue_script('jcolorpicker', mapasdevista_get_baseurl() . '/admin/colorpicker/js/colorpicker.js', array('jquery'));
wp_enqueue_style('colorpicker', mapasdevista_get_baseurl() . '/admin/colorpicker/css/colorpicker.css');
wp_enqueue_script('mapasdevista_theme_options', mapasdevista_get_baseurl() . '/admin/mapasdevista_theme_options.js', array('jquery', 'jcolorpicker'));
}
if ($pagenow === "post.php" || $pagenow === "post-new.php") {
wp_enqueue_script('metabox', mapasdevista_get_baseurl() . '/admin/metabox.js');
} elseif (isset($_GET['page']) && $_GET['page'] === 'mapasdevista_pins_page') {
wp_enqueue_script('metabox', mapasdevista_get_baseurl() . '/admin/pins.js');
}
wp_enqueue_style('mapasdevista-admin', mapasdevista_get_baseurl('template_directory') . '/admin/admin.css');
}
开发者ID:Wikipraca,项目名称:Wikipraca-WikiSquare,代码行数:29,代码来源:functions.php
示例7: theme_options_validate_callback_function
/**
* Faz a validação dos dados
*
*/
function theme_options_validate_callback_function($input)
{
if (!empty($_FILES['logo']['name'])) {
$allowed_file_types = array('jpg' => 'image/jpg', 'jpeg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png');
if (!in_array($_FILES['logo']['type'], $allowed_file_types)) {
wp_die(__('Sorry, this file type is not permitted for security reasons.'));
}
/*
* O antigo wp_handle_upload( $_FILES[$field], array( 'test_form' => false ) ); foi substituído
*/
$upload = media_handle_upload('logo', 0);
if ($upload) {
$input['logo'] = $upload;
}
} else {
if (isset($_POST['restore-default-image']) && $_POST['restore-default-image'] == 1) {
unset($input['logo']);
} else {
$logo = get_theme_option('logo');
if (!empty($logo)) {
$input['logo'] = get_theme_option('logo');
}
}
}
return $input;
}
开发者ID:aspto,项目名称:wordpress-themes,代码行数:30,代码来源:theme-options.php
示例8: get_theme_option_with_default
/**
* Get a theme option wuith a default value
*
* @param string $option The theme option name
* @param $def The default value if the option is not set
* @param string|null $theme The theme name (defaults to the current theme)
* @return string
*/
function get_theme_option_with_default($option, $def, $theme = null)
{
$value = get_theme_option($option, $theme);
if ($value == null || strlen($value) == 0) {
$value = $def;
}
return $value;
}
开发者ID:charvolant,项目名称:bigstuff,代码行数:16,代码来源:functions.php
示例9: getHTML
function getHTML()
{
if ($this->html != "") {
return stripslashes($this->html);
} else {
return "<a " . (get_theme_option('redirect-banner-window') != "" ? "target=\"_blank\"" : "") . " title=\"" . $this->alt . "\" href=\"" . $this->getLinkURL() . "\"><img class=\"bannerAd\" alt=\"" . $this->alt . "\" src=\"" . $this->image . "\" /></a>";
}
}
开发者ID:christocmp,项目名称:bingopaws,代码行数:8,代码来源:banner-manager.php
示例10: theme_option
/**
* Output theme meta value
*
*/
function theme_option($key, $default = '', $filter = '')
{
$value = get_theme_option($key, $default);
switch ($filter) {
case 'wpautop':
$value = wpautop($value);
break;
}
echo $value;
}
开发者ID:Tolkera,项目名称:altheme,代码行数:14,代码来源:utils.php
示例11: get_unused_id_ajax
function get_unused_id_ajax()
{
$lastid = get_theme_option("last_slide_id");
if ($lastid < 3) {
$lastid = 2;
}
$lastid++;
echo esc_html($lastid);
update_theme_option("last_slide_id", $lastid);
die;
}
开发者ID:vorcil,项目名称:adaptiveres,代码行数:11,代码来源:ajax-handlers.php
示例12: getReviewsRatingWordValue
function getReviewsRatingWordValue($r, $words = '')
{
$maxLevel = max(5, (int) get_custom_option('reviews_max_level'));
if (trim($words) == '') {
$words = get_theme_option('reviews_criterias_levels');
}
$words = explode(',', $words);
$k = $maxLevel / count($words);
$r = max(0, min(count($words) - 1, floor($r / $k)));
return isset($words[$r]) ? trim($words[$r]) : __('no rated', 'themerex');
}
开发者ID:riaface,项目名称:GrowBeyond,代码行数:11,代码来源:type-reviews.php
示例13: widget
/**
* How to display the widget on the screen.
*/
function widget($args, $instance)
{
extract($args);
global $wp_query, $post;
global $THEMEREX_CURRENT_SIDEBAR;
/* Our variables from the widget settings. */
$title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '');
$number = isset($instance['number']) ? (int) $instance['number'] : '';
$show_date = isset($instance['show_date']) ? (int) $instance['show_date'] : 0;
$show_image = isset($instance['show_image']) ? (int) $instance['show_image'] : 0;
$show_author = isset($instance['show_author']) ? (int) $instance['show_author'] : 0;
$show_counters = isset($instance['show_counters']) ? (int) $instance['show_counters'] : 0;
$category = isset($instance['category']) ? (int) $instance['category'] : 0;
$show_counters = $show_counters ? get_theme_option("blog_counters") : '';
$output = '';
if ($THEMEREX_CURRENT_SIDEBAR == 'top') {
$output .= '<div class="columnsWrap"><div class="columns1_2">';
}
$args = array('numberposts' => $number, 'offset' => 0, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => current_user_can('read_private_pages') && current_user_can('read_private_posts') ? array('publish', 'private') : 'publish', 'ignore_sticky_posts' => 1, 'suppress_filters' => true);
if ($category > 0) {
$args['category'] = $category;
}
$ex = get_theme_option('exclude_cats');
if (!empty($ex)) {
$args['category__not_in'] = explode(',', $ex);
}
$recent_posts = wp_get_recent_posts($args, OBJECT);
$post_number = 0;
foreach ($recent_posts as $post) {
$post_number++;
require themerex_get_file_dir('/templates/page-part-widgets-posts.php');
if ($THEMEREX_CURRENT_SIDEBAR == 'top' && $post_number == round($number / 2)) {
$output .= '
</div><div class="columns1_2">
';
}
if ($post_number >= $number) {
break;
}
}
if ($THEMEREX_CURRENT_SIDEBAR == 'top') {
$output .= '</div></div>';
}
if (!empty($output)) {
/* Before widget (defined by themes). */
echo balanceTags($before_widget);
/* Display the widget title if one was input (before and after defined by themes). */
echo balanceTags($before_title) . esc_html($title) . balanceTags($after_title);
echo balanceTags($output);
/* After widget (defined by themes). */
echo balanceTags($after_widget);
}
}
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:56,代码来源:widget-recent-posts.php
示例14: tf_print_styles
function tf_print_styles()
{
if (is_admin()) {
return false;
}
wp_enqueue_style('base.css', THEME_CSS . '/base.css');
if (get_theme_option('color_scheme') != 'orange') {
wp_enqueue_style('skin', THEME_CSS . '/' . get_theme_option('color_scheme') . '.css');
}
wp_enqueue_style('skeleton.css', THEME_CSS . '/skeleton.css');
wp_enqueue_style('prettyPhoto.css', THEME_CSS . '/prettyPhoto.css');
wp_enqueue_style('responsive-grid.css', THEME_CSS . '/responsive-grid.css');
}
开发者ID:brycefrees,项目名称:nddLive,代码行数:13,代码来源:head.php
示例15: ultimatum_add_admin_submenus
function ultimatum_add_admin_submenus()
{
$user = wp_get_current_user();
add_submenu_page(THEME_SLUG, __('General Settings', THEME_LANG_DOMAIN), __('General Settings', THEME_LANG_DOMAIN), 'manage_options', THEME_SLUG, 'wonderworks_default');
if (get_theme_option('general', 'ultimatum_seo')) {
add_submenu_page(THEME_SLUG, __('SEO Options', THEME_LANG_DOMAIN), __('SEO Options', THEME_LANG_DOMAIN), 'manage_options', 'wonder-seo', 'seoDefaults');
}
add_submenu_page(THEME_SLUG, __('Font Library', THEME_LANG_DOMAIN), __('Font Library', THEME_LANG_DOMAIN), 'manage_options', 'wonder-fonts', 'fonts');
add_submenu_page(THEME_SLUG, __('Templates', THEME_LANG_DOMAIN), __('Templates', THEME_LANG_DOMAIN), 'manage_options', 'wonder-themes', 'ultimatum_themes');
add_submenu_page('wonder-themes', __('Layout Settings', THEME_LANG_DOMAIN), __('Layout Settings', THEME_LANG_DOMAIN), 'manage_options', 'wonder-layout', 'ultimatum_layouts', THEME_URI . '/wonderfoundry/images/ultimatum-icon.png');
add_submenu_page('wonder-themes', __('CSS Editor', THEME_LANG_DOMAIN), __('CSS Editor', THEME_LANG_DOMAIN), 'manage_options', 'wonder-css', 'cssDefaults', THEME_URI . '/wonderfoundry/images/ultimatum-icon.png');
add_submenu_page(THEME_SLUG, __('Custom Post Types', THEME_LANG_DOMAIN), __('Custom Post Types', THEME_LANG_DOMAIN), 'manage_options', 'wonder-types', 'PostTypes');
add_submenu_page(THEME_SLUG, __('Updates', THEME_LANG_DOMAIN), __('Updates', THEME_LANG_DOMAIN), 'manage_options', 'wonder-update', 'wonder_update');
}
开发者ID:shieldsdesignstudio,项目名称:forefield,代码行数:14,代码来源:menus.php
示例16: collection_order_array
function collection_order_array()
{
$commaSeparatedList = get_theme_option('Collection Order');
if ($commaSeparatedList == NULL) {
$collections = get_records('Collection', array(), 0);
$num_collections = count($collections);
$commaSeparatedList = '';
for ($i = 0; $i < $num_collections; $i++) {
$commaSeparatedList .= $collections[$i]->id;
$commaSeparatedList .= ',';
}
$commaSeparatedList = rtrim($commaSeparatedList, ",");
}
$arrayList = explode(",", $commaSeparatedList);
return $arrayList;
}
开发者ID:HCDigitalScholarship,项目名称:tichadocs_scribe,代码行数:16,代码来源:custom.php
示例17: enqueue_general_scripts
function enqueue_general_scripts()
{
if (is_admin()) {
return;
}
wp_enqueue_script('jquery-tools', THEME_JS . '/jquery.tools.min.js', array('jquery'));
wp_enqueue_script('jquery-prettyphoto', THEME_JS . '/jquery.prettyPhoto.js', array('jquery'));
$fitvids = get_theme_option('general', 'fitvids');
if ($fitvids) {
wp_enqueue_script('jquery-fitvids', THEME_JS . '/jquery.fitvids.js', array('jquery'));
}
wp_enqueue_script('theme.js', THEME_JS . '/theme.js.php', array('jquery-tools'));
if (function_exists('bp_plugin_is_active')) {
if (bp_plugin_is_active()) {
activate_ult_bp();
}
}
}
开发者ID:shieldsdesignstudio,项目名称:forefield,代码行数:18,代码来源:head.php
示例18: getPostShare
function getPostShare($arg, $post_data)
{
$side_bar = get_custom_option('show_sidebar_main');
if (sc_param_is_on(get_custom_option('show_post_info', null, $post_data['post_id'])) && !is_single()) {
$array_info = explode(',', $arg);
$array_list = array();
if ($side_bar != "wide") {
$array_list['views'] = '<div class="postSpan postViews"><span class="icon icon-eye"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . $post_data['post_views'] . '</a></div>';
$array_list['likes'] = '<div class="postSpan postLikes likeButton like" data-postid="' . $post_data['post_id'] . '" data-likes="' . $post_data['post_likes'] . '"><span class="icon icon-heart"></span><a href="" class="revInfo">' . $post_data['post_likes'] . '</a></div>';
$array_list['more'] = $post_data['post_link'] ? '<div class="postSpan postMore"><span class="icon icon-link"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . __('More ', 'themerex') . '</a></div>' : '';
//review
if ($post_data['post_reviews_author'] && sc_param_is_on(get_custom_option('show_reviews', null, $post_data['post_id']))) {
$avg_author = $post_data['post_reviews_' . (get_theme_option('reviews_first') == 'author' ? 'author' : 'users')];
$rating_max = get_custom_option('reviews_max_level');
$array_list['reviews'] = '<div class="postSpan postReview" title="' . sprintf(__('Rating - %s/%s', 'themerex'), $avg_author, $rating_max) . '"><span class="icon icon-star"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . getReviewsSummaryStarsSharing($avg_author, false, false) . '</a></div>';
}
}
$array_list['comments'] = '<div class="postSpan postComment"><span class="icon icon-post"></span><a href="' . $post_data['post_comments_link'] . '" class="revInfo">' . $post_data['post_comments'] . ($side_bar == 'wide' ? ' comments' : '') . '</a></div>';
$post_share = showShareButtons(array("post_id" => $post_data["post_id"], "post_link" => $post_data["post_link"], "post_title" => $post_data["post_title"], "post_descr" => strip_tags($post_data["post_excerpt"]), "post_thumb" => $post_data["post_attachment"], "style" => "drop", "echo" => false));
if ($side_bar != "wide") {
$array_list['share'] = '<div class="postSpan postShare share"><span class="icon icon-share"></span><a class="revInfo shareDrop" href="#">' . __('Share ', 'themerex') . '</a>' . $post_share . '</div>';
} else {
$array_list['share'] = '<div class="postSpan postShare share">' . $post_share . '</div>';
}
$post_info_html = '';
foreach ($array_info as $array_infos) {
foreach ($array_list as $k => $val) {
if ($k == $array_infos) {
$post_info_html .= $val;
}
}
}
if ($post_info_html != '') {
return '<div class="postSharing hoverUnderline">' . $post_info_html . '</div>';
} else {
return '';
}
}
}
开发者ID:riaface,项目名称:GrowBeyond,代码行数:39,代码来源:page-part-postinfo.php
示例19: tk_add_scripts
function tk_add_scripts()
{
global $variable_array;
$slider_type = get_theme_option(wp_get_theme()->name . '_general_slider_type');
wp_enqueue_script('jquery');
wp_enqueue_script('bootstrap', get_template_directory_uri() . '/script/bootstrap/bootstrap.min.js', false, false, true);
wp_enqueue_script('bootstrap-dropdown', get_template_directory_uri() . '/script/bootstrap/twitter-bootstrap-hover-dropdown.min.js', false, false, true);
wp_enqueue_script('jquery-easing', get_template_directory_uri() . '/script/easing/jquery.easing.js', false, false, true);
//checks to see if enabled slider is slit slider
wp_enqueue_script('slitslider', get_template_directory_uri() . '/script/home-slider/js/jquery.slitslider.js', false, false, true);
wp_enqueue_script('modernizer', get_template_directory_uri() . '/script/home-slider/js/modernizr.custom.79639.js', false, false, true);
wp_enqueue_script('ba-cond', get_template_directory_uri() . '/script/home-slider/js/jquery.ba-cond.min.js', false, false, true);
wp_enqueue_script('webticker', get_template_directory_uri() . '/script/webticker/jquery.webticker.js', false, false, true);
wp_enqueue_script('flexslider', get_template_directory_uri() . '/script/flexslider/jquery.flexslider-min.js', false, false, true);
wp_enqueue_script('jplayer', get_template_directory_uri() . '/script/jplayer/js/jquery.jplayer.min.js', false, false, true);
wp_enqueue_script('fancybox', get_template_directory_uri() . '/script/fancybox/jquery.fancybox.pack.js', false, false, true);
wp_enqueue_script('spiner', get_template_directory_uri() . '/script/spiner/spin.min.js', false, false, true);
wp_enqueue_script('isotope', get_template_directory_uri() . '/script/isotope/jquery.isotope.min.js', false, false, true);
wp_enqueue_script('countdown', get_template_directory_uri() . '/script/countdown/jquery.countdown.min.js', false, false, true);
wp_enqueue_script('call-scripts', get_template_directory_uri() . '/script/call-scripts.js', false, false, true);
require get_template_directory() . '/config/localize-script-config.php';
wp_localize_script('call-scripts', 'js_variables', $variable_array);
wp_localize_script('admin', 'js_variables', $variable_array);
/*********************************************************** */
/***********SLIT SLIDER************************************ */
/********************************************************** */
$sl_slider_autoplay = get_theme_option(wp_get_theme()->name . '_general_slider_autoplay');
$sl_slider_speed = get_theme_option(wp_get_theme()->name . '_general_slider_pause_time');
if (empty($sl_slider_speed)) {
$sl_slider_speed = 4000;
}
$sl_slider_animation = get_theme_option(wp_get_theme()->name . '_general_slider_animation_time');
if (empty($sl_slider_animation)) {
$sl_slider_animation = 500;
}
$slider_option = array('slider_autoplay' => $sl_slider_autoplay, 'slider_pause_time' => $sl_slider_speed, 'slider_animation_time' => $sl_slider_animation);
wp_localize_script('slitslider', 'slit_slider_option', $slider_option);
}
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:38,代码来源:scripts-styles.php
示例20: fly_casino_posts
function fly_casino_posts()
{
// Check it Slug has been set
if (get_theme_option('affiliate-slug')) {
$slug = get_theme_option('affiliate-slug');
} else {
$slug = 'review';
}
$args = array('labels' => array('name' => __('Online Casinos'), 'singular_name' => __('Online Casino'), 'add_new' => __('Add New Online Casino'), 'add_new_item' => __('Add New Online Casino'), 'edit' => __('Edit Online Casino'), 'edit_item' => __('Edit Online Casino'), 'new_item' => __('New Online Casino'), 'view' => __('View Online Casino'), 'view_item' => __('View Online Casino'), 'search_items' => __('Search Online Casinos'), 'not_found' => __('No Online Casinos found'), 'not_found_in_trash' => __('No Online Casinos found in Trash'), 'parent' => __('Parent Online Casino')), 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => $slug, 'with_front' => false), 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', 'page-attributes', 'comments', 'author'));
register_post_type('casino', $args);
$labels = array('name' => _x('Affiliate Tags', 'affiliate tag'), 'singular_name' => _x('affiliate tag', 'affiliate tag'), 'search_items' => __('Search Affiliate Tags'), 'all_items' => __('All Affiliate Tags'), 'parent_item' => __('Parent Affiliate Tag'), 'parent_item_colon' => __('Parent Affiliate Tag:'), 'edit_item' => __('Edit Affiliate Tag'), 'update_item' => __('Update Affiliate Tag'), 'add_new_item' => __('Add New Affiliate Tag'), 'new_item_name' => __('New Affiliate Tag'), 'menu_name' => __('Affiliate Tags'));
register_taxonomy('affiliate-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-affiliates')));
$labels2 = array('name' => _x('Networks', 'Network tag'), 'singular_name' => _x('Network tag', 'Network tag'), 'search_items' => __('Search Network Tags'), 'all_items' => __('All Network Tags'), 'parent_item' => __('Parent Network Tag'), 'parent_item_colon' => __('Parent Network Tag:'), 'edit_item' => __('Edit Network Tag'), 'update_item' => __('Update Network Tag'), 'add_new_item' => __('Add New Network Tag'), 'new_item_name' => __('New Network Tag'), 'menu_name' => __('Networks'));
register_taxonomy('network-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels2, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-networks')));
$labels3 = array('name' => _x('Deposit Options', 'Deposit Options'), 'singular_name' => _x('Deposit Option', 'Deposit Option'), 'search_items' => __('Search Deposit Options'), 'all_items' => __('All Deposit Options'), 'parent_item' => __('Parent Deposit Option'), 'parent_item_colon' => __('Parent Deposit Options:'), 'edit_item' => __('Edit Deposit Option'), 'update_item' => __('Update Deposit Option'), 'add_new_item' => __('Add New Deposit Option'), 'new_item_name' => __('New Deposit Options'), 'menu_name' => __('Deposit Options'));
register_taxonomy('deposit-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels3, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-doptions')));
$labels4 = array('name' => _x('Withdrawal Options', 'Withdrawal Options'), 'singular_name' => _x('Withdrawal Option', 'Withdrawal Option'), 'search_items' => __('Search Withdrawal Options'), 'all_items' => __('All Withdrawal Options'), 'parent_item' => __('Parent Withdrawal Option'), 'parent_item_colon' => __('Parent Withdrawal Options:'), 'edit_item' => __('Edit Withdrawal Option'), 'update_item' => __('Update Withdrawal Option'), 'add_new_item' => __('Add New Withdrawal Option'), 'new_item_name' => __('New Withdrawal Options'), 'menu_name' => __('Withdrawal Options'));
register_taxonomy('withdrawal-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels4, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-wdptions')));
$labels5 = array('name' => _x('Platforms', 'Platforms'), 'singular_name' => _x('Platform', 'Platform'), 'search_items' => __('Search Platforms'), 'all_items' => __('All Platforms'), 'parent_item' => __('Parent Platform'), 'parent_item_colon' => __('Parent Platforms:'), 'edit_item' => __('Edit Platform'), 'update_item' => __('Update Platform'), 'add_new_item' => __('Add New Platform'), 'new_item_name' => __('New Platforms'), 'menu_name' => __('Platforms'));
register_taxonomy('platform-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels5, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-platform')));
$labels6 = array('name' => _x('Support Type', 'Support Types'), 'singular_name' => _x('Support Type', 'Support Type'), 'search_items' => __('Search Support Types'), 'all_items' => __('All Currencies'), 'parent_item' => __('Parent Support Type'), 'parent_item_colon' => __('Parent Support Types:'), 'edit_item' => __('Edit Support Type'), 'update_item' => __('Update Support Type'), 'add_new_item' => __('Add New Support Type'), 'new_item_name' => __('New Support Types'), 'menu_name' => __('Support Types'));
register_taxonomy('support-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels6, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-support')));
}
开发者ID:christocmp,项目名称:bingopaws,代码行数:23,代码来源:custom_meta_boxes.php
注:本文中的get_theme_option函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论