当前位置: 首页>>代码示例>>PHP>>正文


PHP ot_settings_id函数代码示例

本文整理汇总了PHP中ot_settings_id函数的典型用法代码示例。如果您正苦于以下问题:PHP ot_settings_id函数的具体用法?PHP ot_settings_id怎么用?PHP ot_settings_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ot_settings_id函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: thb_import_theme_options

function thb_import_theme_options()
{
    $file = get_template_directory_uri() . "/inc/democontent/theme-options.txt";
    $theme_options_txt = wp_remote_get($file);
    $options = unserialize(ot_decode($theme_options_txt['body']));
    /* get settings array */
    $settings = get_option(ot_settings_id());
    /* validate options */
    foreach ($settings['settings'] as $setting) {
        if (isset($options[$setting['id']])) {
            $content = ot_stripslashes($options[$setting['id']]);
            $options[$setting['id']] = ot_validate_setting($content, $setting['type'], $setting['id']);
        }
    }
    /* update the option tree array */
    update_option(ot_options_id(), $options);
    $message = 'success';
}
开发者ID:adampdarcy,项目名称:paola,代码行数:18,代码来源:import.php

示例2: custom_theme_options

/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'general_help', 'title' => __('Author Homepage', 'ubpress'), 'content' => '<p>' . __('Please visit: <a href="http://www.uyenbac.net" target="_blank">UBTeam Homepage</a>', 'ubpress') . '</p>'), array('id' => 'about_help', 'title' => __('About UBTeam', 'ubpress'), 'content' => '<p>' . __('With UBTeam, We are one! This is our slogan. UBTeam was established in 2014 with many large and small projects to date. We hope to contribute to the development community growing internet Vietnam. Thank you!', 'ubpress') . '</p>')), 'sidebar' => '<p>' . __('You are welcome :)', 'ubpress') . '</p>'), 'sections' => array(array('id' => 'general', 'title' => __('Generelt', 'ubpress')), array('id' => 'footer', 'title' => __('Fødder', 'ubpress'))), 'settings' => array(array('id' => 'about-us', 'label' => __('Om os', 'ubpress'), 'desc' => __('Mere introducere os her', 'ubpress'), 'std' => '', 'type' => 'textarea', 'section' => 'general', 'rows' => '15', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'slider-list', 'label' => __('Slider liste', 'ubpress'), 'desc' => __('Lav en liste over skyderen til hjemmesiden her.', 'ubpress'), 'std' => '', 'type' => 'list-item', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'slider-image', 'label' => __('Billede Upload', 'ubpress'), 'desc' => __('Billede Upload til skyderen på her.', 'ubpress'), 'std' => '', 'type' => 'upload', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'copyright-footer', 'label' => __('Ophavsret', 'ubpress'), 'desc' => __('Skrevet under webstedet ophavsret her', 'ubpress'), 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '15', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'resume', 'label' => __('Resumé', 'ubpress'), 'desc' => __('Skrivning resuméer fødder hjemmeside her', 'ubpress'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'footer', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
开发者ID:JeppeSigaard,项目名称:hf2net,代码行数:31,代码来源:theme-options.php

示例3: custom_theme_options

/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => __('General', 'single-page-corp')), array('id' => 'home', 'title' => __('Home', 'single-page-corp')), array('id' => 'social', 'title' => __('Social', 'single-page-corp'))), 'settings' => array(array('id' => 'logo', 'label' => __('Logo', 'single-page-corp'), 'desc' => __('Upload your website Logo', 'single-page-corp'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'background', 'label' => __('Background', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'background', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'font', 'label' => __('Font', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'google-fonts', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'google_analytics', 'label' => __('Google Analytics', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'textarea-simple', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'css_setting', 'label' => __('css setting', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'css', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'copy', 'label' => __('copy', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'header_image', 'label' => __('Header Image', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'upload', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_about_us', 'label' => __('Show About Us', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'radio', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'show', 'label' => __('Show', 'single-page-corp'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'single-page-corp'), 'src' => ''))), array('id' => 'about_us_heading', 'label' => __('About Us Heading', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'about_us_content', 'label' => __('About Us Content', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_porfolio', 'label' => __('Show Porfolio', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'radio', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'show', 'label' => __('Show', 'single-page-corp'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'single-page-corp'), 'src' => ''))), array('id' => 'portfolio_heading', 'label' => __('Portfolio Heading', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_clients', 'label' => __('Show Clients', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'on-off', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'show_google_map', 'label' => __('Show Google Map', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'radio', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => 'show', 'label' => __('Show', 'single-page-corp'), 'src' => ''), array('value' => 'hide', 'label' => __('Hide', 'single-page-corp'), 'src' => ''))), array('id' => 'google_map_code', 'label' => __('Google Map Code', 'single-page-corp'), 'desc' => __('Enter Your code for Google map', 'single-page-corp'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'home', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'social', 'label' => __('Social', 'single-page-corp'), 'desc' => '', 'std' => '', 'type' => 'social-links', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
开发者ID:chsunil,项目名称:corp,代码行数:28,代码来源:theme-options.php

示例4: custom_theme_options

/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'theme-text-domain'), 'content' => '<p>' . __('Help content goes here!', 'theme-text-domain') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'theme-text-domain') . '</p>'), 'sections' => array(array('id' => 'header', 'title' => __('Header', 'theme-text-domain')), array('id' => 'content', 'title' => __('Content', 'theme-text-domain')), array('id' => 'footer', 'title' => __('Footer', 'theme-text-domain'))), 'settings' => array(array('id' => 'header_text', 'label' => __('Header Text', 'theme-text-domain'), 'desc' => 'Header Text Here', 'std' => '', 'type' => 'text', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'change_logo', 'label' => __('Logo Upload', 'theme-text-domain'), 'desc' => 'Upload your logo', 'std' => '', 'type' => 'upload', 'section' => 'header', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'white_text_title', 'label' => __('White Text Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'white_text_left', 'label' => __('White Text Left', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'white_text_right', 'label' => __('White Text Right', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'green_box', 'label' => __('Green Box (Max 3)', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'green_box_image', 'label' => __('Image', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'upload', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'green_box_link', 'label' => __('Link', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'green_box_desc', 'label' => __('Description', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea_simple', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'new_post_title', 'label' => __('New Post Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'content', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_middle_title', 'label' => __('Footer Middle Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_middle', 'label' => __('Footer Middle', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_right_title', 'label' => __('Footer Right Title', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_right_info', 'label' => __('Footer Right Info', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'footer_right_icon', 'label' => __('Font Awesome Icon', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_right_content', 'label' => __('Content', 'theme-text-domain'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'copyright_text', 'label' => __('Copyright Text', 'theme-text-domain'), 'desc' => 'Copyright Text Here', 'std' => '', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
开发者ID:samsunoor,项目名称:default-theme,代码行数:31,代码来源:theme-options.php

示例5: custom_theme_options

/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'addthis', 'title' => __('AddThis', 'helium')), array('id' => 'ajax_navigation', 'title' => __('AJAX Navigation', 'helium')), array('id' => 'typekit', 'title' => __('Typekit', 'helium')), array('id' => 'api_keys', 'title' => __('API Keys', 'helium')), array('id' => 'post_type_slugs', 'title' => __('Post Type Slugs', 'helium')), array('id' => 'envato_credentials', 'title' => __('Envato Credentials', 'helium')), array('id' => 'miscellaneous', 'title' => __('Miscellaneous', 'helium'))), 'settings' => array(array('id' => 'addthis_sharing_buttons', 'label' => __('Sharing Buttons', 'helium'), 'desc' => __('Enter a comma separated list of AddThis social media sharing buttons to show at the end of each item page.
See this for available buttons: <a href="http://www.addthis.com/services/list">www.addthis.com/services/list</a>', 'helium'), 'std' => 'facebook, twitter, email, compact', 'type' => 'text', 'section' => 'addthis', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'addthis_profile_id', 'label' => __('Profile ID', 'helium'), 'desc' => __('Specify here your AddThis profile ID if you want to track your AddThis sharing data.', 'helium'), 'std' => '', 'type' => 'text', 'section' => 'addthis', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'ajax_navigation', 'label' => __('Enabled', 'helium'), 'desc' => __('Specify whether to enable sitewide AJAX navigation to enhance the user experience. Turn this off if you\'re experiencing problems while viewing your site.', 'helium'), 'std' => 'on', 'type' => 'on-off', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'ajax_navigation_scroll_top', 'label' => __('Scroll to Top Before Navigation', 'helium'), 'desc' => __('Specify whether to scroll to top of the page before navigating away from a page.', 'helium'), 'std' => 'on', 'type' => 'on-off', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'ajax_navigation:is(on)', 'operator' => 'and'), array('id' => 'ajax_navigation_loading_text', 'label' => __('Loading Text', 'helium'), 'desc' => __('Specify the text to show while a page is being loaded.', 'helium'), 'std' => 'Loading', 'type' => 'text', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => 'ajax_navigation:is(on)', 'operator' => 'and'), array('id' => 'ajax_exclude_urls', 'label' => __('Exclude URLs', 'helium'), 'desc' => __('Specify here a list of URLs on each line where AJAX navigation should be disabled.', 'helium'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'ajax_navigation', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'typekit_kit_id', 'label' => __('Typekit Kit ID', 'helium'), 'desc' => __('Enter here your Typekit Kit ID.', 'helium'), 'std' => '', 'type' => 'text', 'section' => 'typekit', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'typekit_cache', 'label' => __('Cache', 'helium'), 'desc' => __('Turn off Typekit data cache to always update your kit data. It\'s useful when developing the site but make sure to turn it back on in production mode.', 'helium'), 'std' => 'on', 'type' => 'on-off', 'section' => 'typekit', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_api_keys', 'label' => __('Twitter API Keys', 'helium'), 'desc' => __('Before using Twitter widgets throughout the site, you need to register your API keys by following the instructions below.
<ol>
  <li>Go to <a>http://dev.twitter.com/apps</a> and sign in with your Twitter account.</li>
  <li>Create a new application by clicking the button on the right hand side.</li>
  <li>Once you\'ve created the app, scroll down the application\'s details page to find the OAuth section.</li>
  <li>Copy the consumer secret and consumer key into the fields below.</li>
  <li>Then click the Create Access Token button at the bottom of the page.</li>
  <li>Copy the Access token and Access token secret and paste it into the fields below.</li>
</ol>', 'helium'), 'std' => '', 'type' => 'textblock-titled', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_consumer_key', 'label' => __('Twitter API Consumer Key', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_consumer_secret', 'label' => __('Twitter API Consumer Secret', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_access_token', 'label' => __('Twitter API Access Token', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_access_token_secret', 'label' => __('Twitter API Access Token Secret', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'api_keys', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'portfolio_slug', 'label' => __('Portfolio Slug', 'helium'), 'desc' => __('Specify here the portfolio post type slug. Default is <strong>portfolio</strong>.', 'helium'), 'std' => 'portfolio', 'type' => 'text', 'section' => 'post_type_slugs', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'envato_credentials', 'label' => __('Envato Credentials', 'helium'), 'desc' => __('Enter your Envato Market credentials below to access the demo content importer and get automatic theme update notifications directly from WordPress admin.', 'helium'), 'std' => '', 'type' => 'textblock-titled', 'section' => 'envato_credentials', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'envato_username', 'label' => __('Envato Username', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'envato_credentials', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'envato_api_key', 'label' => __('Envato API Key', 'helium'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'envato_credentials', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_css', 'label' => __('Custom CSS', 'helium'), 'desc' => __('Enter here your custom CSS code to be applied to the whole site.', 'helium'), 'std' => '', 'type' => 'css', 'section' => 'miscellaneous', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
开发者ID:yemingyuen,项目名称:mingsg,代码行数:37,代码来源:theme-options.php

示例6: custom_theme_options

/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => __('General', 'wordpress-template')), array('id' => 'footer', 'title' => __('Footer', 'wordpress-template')), array('id' => 'social', 'title' => __('Social', 'wordpress-template')), array('id' => 'social-api', 'title' => __('API Keys', 'wordpress-template'))), 'settings' => array(array('id' => 'brick', 'label' => __('Brick', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'radio-image', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'choices' => array(array('value' => '2x1', 'label' => __('2x1', 'wordpress-template'), 'src' => get_stylesheet_directory_uri() . '/img/ncstate-brick-2x1-red.png'), array('value' => '2x2', 'label' => __('2x2', 'wordpress-template'), 'src' => get_stylesheet_directory_uri() . '/img/ncstate-brick-2x2-red.png'))), array('id' => 'ga_id', 'label' => __('Google Analytics ID', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'cse_id', 'label' => __('Google Custom Search Engine ID', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'address', 'label' => __('Address', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'resource_links', 'label' => __('Resource Links', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'list-item', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and', 'settings' => array(array('id' => 'url', 'label' => __('URL', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'))), array('id' => 'facebook', 'label' => __('Facebook Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter', 'label' => __('Twitter Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'instagram', 'label' => __('Instagram Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youtube', 'label' => __('YouTube Username', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'rss', 'label' => __('RSS', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'FACEBOOK_APP_ID', 'label' => __('Facebook App ID', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'FACEBOOK_SECRET', 'label' => __('Facebook Secret', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'INSTAGRAM_APP_KEY', 'label' => __('Instagram App Key', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'TWITTER_CONSUMER_KEY', 'label' => __('Twitter Consumer Key', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'TWITTER_CONSUMER_SECRET', 'label' => __('Twitter Consumer Secret', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'OAUTH_TOKEN', 'label' => __('Twitter oAuth Token', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'OAUTH_TOKEN_SECRET', 'label' => __('Twitter oAuth Token Secret', 'wordpress-template'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'social-api', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
开发者ID:jrchamp,项目名称:wordpress-template,代码行数:28,代码来源:theme-options.php

示例7: ph_theme_options

function ph_theme_options()
{
    $saved_settings = get_option(ot_settings_id(), array());
    $settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => 'Help', 'content' => '')), 'sidebar' => ''), 'sections' => gp_load_yaml('/etc/sections.yaml'), 'settings' => gp_load_yaml('/etc/settings.yaml'));
    //end of $settings
    $settings = apply_filters(ot_settings_id() . '_args', $settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $settings) {
        update_option(ot_settings_id(), $settings);
    }
}
开发者ID:sjozsef,项目名称:geckopress,代码行数:11,代码来源:options.php

示例8: custom_theme_options

/**
 * Build the custom settings & update OptionTree.
 *
 * @return    void
 * @since     2.0
 */
function custom_theme_options()
{
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'home_page_help', 'title' => __('Option Types', HB_DOMAIN_TXT), 'content' => '<p>' . __('Help content goes here!', HB_DOMAIN_TXT) . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', HB_DOMAIN_TXT) . '</p>'), 'sections' => array(array('id' => 'logo_section', 'title' => '<i class="dashicons-before dashicons-awards"></i>&nbsp; &nbsp; ' . __('Site Logo', HB_DOMAIN_TXT)), array('id' => 'typo_section', 'title' => '<i class="dashicons-before dashicons-editor-spellcheck"></i>&nbsp; &nbsp; ' . __('Typography', HB_DOMAIN_TXT)), array('id' => 'shop_section', 'title' => '<i class="dashicons-before dashicons-store"></i>&nbsp; &nbsp; ' . __('Shop', HB_DOMAIN_TXT)), array('id' => 'socials', 'title' => '<i class="dashicons-before dashicons-universal-access-alt"></i>&nbsp; &nbsp; ' . __('Socials', HB_DOMAIN_TXT)), array('id' => 'mobile', 'title' => '<i class="dashicons-before dashicons-smartphone"></i>&nbsp; &nbsp; ' . __('Mobile & Tablet', HB_DOMAIN_TXT)), array('id' => 'footer', 'title' => '<i class="dashicons-before dashicons-carrot"></i>&nbsp; &nbsp; ' . __('Footer', HB_DOMAIN_TXT))), 'settings' => array(array('id' => 'logo', 'label' => __('Logo', HB_DOMAIN_TXT), 'type' => 'upload', 'section' => 'logo_section'), array('id' => 'alt_logo', 'label' => __('Alternative Logo', HB_DOMAIN_TXT), 'type' => 'upload', 'section' => 'logo_section'), array('id' => 'site_fonts_type', 'label' => __('Fonts Type', HB_DOMAIN_TXT), 'type' => 'select', 'section' => 'typo_section', 'choices' => array(array('value' => 'google-fonts', 'label' => __('Google Fonts', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'typekit', 'label' => __('Typekit', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'default', 'label' => __('Default', HB_DOMAIN_TXT), 'src' => ''))), array('id' => 'typekit', 'label' => __('Embed Code', HB_DOMAIN_TXT), 'type' => 'textarea-simple', 'section' => 'typo_section', 'condition' => 'site_fonts_type:is(typekit)', 'operator' => 'and'), array('id' => 'body_typo', 'label' => __('Body', HB_DOMAIN_TXT), 'type' => 'googlefont', 'section' => 'typo_section', 'condition' => 'site_fonts_type:is(google-fonts)', 'operator' => 'and'), array('id' => 'headlines_typo', 'label' => __('Headlines', HB_DOMAIN_TXT), 'type' => 'googlefont', 'section' => 'typo_section', 'condition' => 'site_fonts_type:is(google-fonts)', 'operator' => 'and'), array('id' => 'class_per_page', 'label' => __('Display class per page', HB_DOMAIN_TXT), 'type' => 'numeric-slider', 'section' => 'shop_section', 'std' => '12', 'min_max_step' => '3,99,3'), array('id' => 'start_displaying_stock_qty', 'label' => __('Display class QTY when stock # is', HB_DOMAIN_TXT), 'type' => 'numeric-slider', 'section' => 'shop_section', 'std' => '10', 'min_max_step' => '1,500,1'), array('id' => 'brand_new_copy', 'label' => __('Class&apos;s Brand New Copy', HB_DOMAIN_TXT), 'type' => 'text', 'section' => 'shop_section', 'std' => __('Brand New', HB_DOMAIN_TXT)), array('id' => 'site_socials', 'label' => __('', HB_DOMAIN_TXT), 'type' => 'social-links', 'section' => 'socials'), array('id' => 'mobile_menu', 'label' => __('Show Mobile Menu For', HB_DOMAIN_TXT), 'std' => 'md', 'type' => 'select', 'section' => 'mobile', 'choices' => array(array('value' => 'xs', 'label' => __('Extra small devices (≤768px)', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'sm', 'label' => __('Small devices (≤992px)', HB_DOMAIN_TXT), 'src' => ''), array('value' => 'md', 'label' => __('Medium devices (≤1200px)', HB_DOMAIN_TXT), 'src' => ''))), array('id' => 'footer_content', 'label' => __('Content', HB_DOMAIN_TXT), 'type' => 'textarea', 'section' => 'footer')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
开发者ID:sajidshah,项目名称:le-dolci,代码行数:24,代码来源:hb-theme-options.php

示例9: custom_theme_options

function custom_theme_options()
{
    /**
     * Get a copy of the saved settings array.
     * ot_settings_id() --> option_tree_settings
     */
    $saved_settings = get_option(ot_settings_id(), array());
    $blogname = get_bloginfo('name');
    $blogurl = get_bloginfo('url');
    $categories = get_categories();
    $cats_output = '';
    foreach ($categories as $cat) {
        $cats_output .= $cat->cat_ID . ' => ' . $cat->cat_name . ';<br>';
    }
    $posts = get_posts('numberposts=500&post_type=post&orderby=ID&order=DESC');
    $posts_output = '';
    foreach ($posts as $post) {
        $posts_output .= $post->ID . ' => ' . $post->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $post->post_date . '</span>);<br>';
    }
    $pages = get_posts('numberposts=50&post_type=page&orderby=ID&order=DESC');
    $pages_output = '';
    foreach ($pages as $page) {
        $pages_output .= $page->ID . ' => ' . $page->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $page->post_date . '</span>);<br>';
    }
    $products = get_posts('numberposts=100&post_type=store&orderby=ID&order=DESC');
    $products_output = '';
    foreach ($products as $product) {
        $products_output .= $product->ID . ' => ' . $product->post_title . '&nbsp;&nbsp;(<span style="color:#1cbdc5">' . $product->post_date . '</span>);<br>';
    }
    $theme = wp_get_theme();
    $version = $theme->get('Version');
    //Admin Panel Sections
    $sections = array(array('id' => 'bases', 'title' => '基本设置'), array('id' => 'layout', 'title' => '页面布局'), array('id' => 'blogform', 'title' => '文章形式'), array('id' => 'webstyle', 'title' => '网站样式'), array('id' => 'advanced', 'title' => '高级设置'));
    //Admin Panel Settings
    $settings = array(array('id' => 'opt_description', 'label' => '页面描述', 'desc' => '网站首页描述(非必须,但对SEO有影响)', 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'bases'), array('id' => 'opt_keywords', 'label' => '页面关键词', 'desc' => '网站首页、分类页关键词(非必须,但对SEO有影响,不同关键词用英文逗号隔开)', 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'bases'), array('id' => 'opt_favicon', 'label' => 'Favicon图标', 'desc' => '上传一个16x16像素大小的 Png/Gif 图像作为网站的图标', 'type' => 'upload', 'section' => 'bases'), array('id' => 'opt_logo', 'label' => '网站Logo图像开关', 'desc' => '使用图像替代文本作为网站的Logo', 'type' => 'on-off', 'section' => 'bases', 'std' => 'off'), array('id' => 'opt_logo_img', 'label' => '网站Logo图像设置', 'desc' => '上传一个图像作为网站的Logo,推荐大小60x120(max)像素', 'type' => 'upload', 'section' => 'bases'), array('id' => 'opt_beian', 'label' => 'Footer中显示备案号', 'desc' => '在网页底部Footer中显示备案号', 'type' => 'text', 'rows' => '1', 'std' => '', 'section' => 'layout'), array('id' => 'opt_show_thumb', 'label' => '文章页特色图', 'desc' => '文章页上方是否显示特色图', 'type' => 'on-off', 'std' => 'on', 'section' => 'blogform'), array('id' => 'opt_share', 'label' => '文章分享开关', 'desc' => '文章页下方是否显示分享', 'type' => 'on-off', 'std' => 'on', 'section' => 'blogform'), array('id' => 'opt_copyright', 'label' => __('文章页版权信息', 'xiapistudio'), 'desc' => __('文章页版权信息,为默认值,如果作者投稿添加了版权信息,将会覆盖此默认值', 'xiapistudio'), 'type' => 'textarea_simple', 'rows' => '5', 'section' => 'blogform', 'std' => __('<p>除特别注明外,本站所有文章均为<a href="{url}" title="{name}" target="_blank">{name}</a>原创,转载请注明出处来自<a href="{link}" title="{title}">{link}</a></p>', 'xiapistudio')), array('id' => 'opt_slider', 'label' => '首页幻灯片', 'desc' => '是否开启首页幻灯轮播', 'type' => 'on-off', 'std' => 'off', 'section' => 'webstyle'), array('id' => 'opt_alipay_email', 'label' => '支付宝收款帐户邮箱', 'desc' => '支付宝收款帐户邮箱,要收款必填并务必保持正确', 'type' => 'text', 'std' => '', 'section' => 'advanced'), array('id' => 'opt_alipay_qr', 'label' => '支付宝收款二维码', 'desc' => '支付宝收款二维码,请至支付宝获取二维码并填写二维码图片链接', 'type' => 'text', 'std' => '', 'section' => 'advanced'));
    //Admin Custom settings
    $custom_settings = array('sections' => $sections, 'settings' => $settings);
    //allow settings to be filtered before saving
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    //settings are not the same update the DB
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
}
开发者ID:xiapistudio,项目名称:change,代码行数:44,代码来源:theme-options.php

示例10: custom_theme_options

/**
 * Build the custom settings & update OptionTree.
 */
function custom_theme_options()
{
    /* OptionTree is not loaded yet, or this is not an admin request */
    if (!function_exists('ot_settings_id') || !is_admin()) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general', 'title' => __('General', 'jinda')), array('id' => 'advertisements', 'title' => __('Advertisements', 'jinda')), array('id' => 'footer', 'title' => __('Footer', 'jinda'))), 'settings' => array(array('id' => 'website_logo', 'label' => __('Website logo', 'jinda'), 'desc' => __('recommended size: 200x80px', 'jinda'), 'std' => '', 'type' => 'upload', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'description', 'label' => __('Description', 'jinda'), 'desc' => __('this field for website meta description tag.', 'jinda'), 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'keywords', 'label' => __('Keywords', 'jinda'), 'desc' => __('this field for website meta keywords tag.', 'jinda'), 'std' => '', 'type' => 'text', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_html', 'label' => __('Custom HTML', 'jinda'), 'desc' => __('place your custom HTML tag here<br />
like a popup window from external service.', 'jinda'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_css', 'label' => __('Custom CSS', 'jinda'), 'desc' => __('place your custom CSS here.<br /><br />
** place without <u>style</u> tag **', 'jinda'), 'std' => '', 'type' => 'css', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'custom_scripts', 'label' => __('Custom Javascripts', 'jinda'), 'desc' => __('Place your external javascript here<br />
like Google Analytics, Facebook Javascript or sth..<br /><br />

** place without <u>script</u> tag **', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'general', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'banner_top', 'label' => __('Banner Top', 'jinda'), 'desc' => __('Place your banner script here <br />
<strong>Recommended size: 468x60px</strong><br /><br />

<small>ไม่ต้องสนใจว่ามันจะฟ้อง error อะไร<br /> ถ้าวางแล้วโฆษณาขึ้นก็โอเค</small>', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'advertisements', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'banner_single', 'label' => __('Banner Single', 'jinda'), 'desc' => __('Place your banner script here <br />
<strong>Recommended size: 300x250</strong><br /><br />

<small>ไม่ต้องสนใจว่ามันจะฟ้อง error อะไร<br /> ถ้าวางแล้วโฆษณาขึ้นก็โอเค</small>', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'advertisements', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'banner_loop', 'label' => __('Banner Loop', 'jinda'), 'desc' => __('เมื่อครบ 3 posts จะแสดง advertise banner 1 ครั้ง<br />
<strong>recommended size: 468x60px</strong><br /><br />

<small>
ไม่ต้องสนใจว่ามัน error อะไร<br />
ถ้า banner ขึ้นถือว่าโอเค
</small>', 'jinda'), 'std' => '', 'type' => 'javascript', 'section' => 'advertisements', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_copyright', 'label' => __('Footer Copyright', 'jinda'), 'desc' => __('Your copyright goes here.', 'jinda'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'facebook_link', 'label' => __('Facebook Link', 'jinda'), 'desc' => '', 'std' => 'https://www.facebook.com/pages/Techr', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'twitter_link', 'label' => __('Twitter Link', 'jinda'), 'desc' => '', 'std' => 'https://twitter.com/TechrThailand', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'google_plus_link', 'label' => __('Google Plus Link', 'jinda'), 'desc' => '', 'std' => 'https://plus.google.com/105874781308314969682', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'youtube_link', 'label' => __('Youtube Link', 'jinda'), 'desc' => '', 'std' => 'https://www.youtube.com/channel/UCijPSEL2EQa-KZBOtSwE0MQ', 'type' => 'text', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and'), array('id' => 'footer_credit', 'label' => __('Footer Credit', 'jinda'), 'desc' => __('Credit ของผู้พัฒนา', 'jinda'), 'std' => '', 'type' => 'textarea', 'section' => 'footer', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'condition' => '', 'operator' => 'and')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
开发者ID:ex0ample,项目名称:JindaAds,代码行数:45,代码来源:theme-options.php

示例11: _get_custom_css

 static function _get_custom_css()
 {
     $html = false;
     /* grab a copy of the settings */
     $settings = get_option(ot_settings_id());
     $options = get_option(ot_options_id());
     /* has settings */
     if (isset($settings['settings'])) {
         /* loop through sections and insert CSS when needed */
         foreach ($settings['settings'] as $k => $setting) {
             $allows = self::_options_allow_output();
             if (!empty($allows) and in_array($setting['type'], $allows) and isset($setting['output']) and $setting['output']) {
                 if (isset($options[$setting['id']])) {
                     $html .= self::_get_output_item_css($setting, $options[$setting['id']]);
                 }
             }
         }
     }
     return $html;
 }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:20,代码来源:custom-css-output.php

示例12: landx_theme_options

/**
 * Build the custom settings & update OptionTree.
 */
function landx_theme_options()
{
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    //available option functions - return type array()
    $general_options = landx_general_options();
    $background_options = landx_background_options();
    $header_options = landx_header_options();
    $sidebar_options = landx_sidebar_options();
    $footer_options = landx_footer_options();
    $page_options = landx_page_options();
    $blog_options = landx_blog_options();
    $typography_options = landx_typography_options();
    $styling_options = landx_styling_options();
    $theme_text = landx_theme_text();
    $custom_css = landx_custom_css();
    //merge all available options
    $settings = array_merge($general_options, $background_options, $header_options, $sidebar_options, $footer_options, $page_options, $blog_options, $typography_options, $styling_options, $theme_text, $custom_css);
    $custom_settings = array('contextual_help' => array('sidebar' => ''), 'sections' => array(array('id' => 'general_options', 'title' => __('General options', THEMENAME)), array('id' => 'background_options', 'title' => __('Background Options', THEMENAME)), array('id' => 'footer_options', 'title' => __('Footer options', THEMENAME)), array('id' => 'sidebar_option', 'title' => __('Sidebar options', THEMENAME)), array('id' => 'blog_options', 'title' => __('Blog options', THEMENAME)), array('id' => 'fonts', 'title' => __('Typography options', THEMENAME)), array('id' => 'styling_options', 'title' => __('Styling options', THEMENAME)), array('id' => 'custom_css', 'title' => __('Custom css', THEMENAME))), 'settings' => $settings);
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
    return $custom_settings['settings'];
}
开发者ID:viniciuswiesehofer,项目名称:ERPLINCE,代码行数:43,代码来源:theme-options.php

示例13: add_section

 /**
  * AJAX utility function for adding a new section.
  */
 public function add_section()
 {
     echo ot_sections_view(ot_settings_id() . '[sections]', $_REQUEST['count']);
     die;
 }
开发者ID:venamax,项目名称:trixandtrax-cl,代码行数:8,代码来源:ot-loader.php

示例14: ot_maybe_migrate_settings

 function ot_maybe_migrate_settings()
 {
     // Filter the ID to migrate from
     $settings_id = apply_filters('ot_migrate_settings_id', '');
     // Attempt to migrate Settings
     if (!empty($settings_id) && get_option(ot_settings_id()) === false && ot_settings_id() !== $settings_id) {
         // Old settings
         $settings = get_option($settings_id);
         // Check for array keys
         if (isset($settings['sections']) && isset($settings['settings'])) {
             update_option(ot_settings_id(), $settings);
         }
     }
 }
开发者ID:ElectricEasel,项目名称:reflection,代码行数:14,代码来源:ot-functions-admin.php

示例15: ot_wpml_filter

 function ot_wpml_filter($options, $option_id)
 {
     // Return translated strings using WMPL
     if (function_exists('icl_t')) {
         $settings = get_option(ot_settings_id());
         if (isset($settings['settings'])) {
             foreach ($settings['settings'] as $setting) {
                 // List Item & Slider
                 if ($option_id == $setting['id'] && in_array($setting['type'], array('list-item', 'slider'))) {
                     foreach ($options[$option_id] as $key => $value) {
                         foreach ($value as $ckey => $cvalue) {
                             $id = $option_id . '_' . $ckey . '_' . $key;
                             $_string = icl_t('Theme Options', $id, $cvalue);
                             if (!empty($_string)) {
                                 $options[$option_id][$key][$ckey] = $_string;
                             }
                         }
                     }
                     // List Item & Slider
                 } else {
                     if ($option_id == $setting['id'] && $setting['type'] == 'social-links') {
                         foreach ($options[$option_id] as $key => $value) {
                             foreach ($value as $ckey => $cvalue) {
                                 $id = $option_id . '_' . $ckey . '_' . $key;
                                 $_string = icl_t('Theme Options', $id, $cvalue);
                                 if (!empty($_string)) {
                                     $options[$option_id][$key][$ckey] = $_string;
                                 }
                             }
                         }
                         // All other acceptable option types
                     } else {
                         if ($option_id == $setting['id'] && in_array($setting['type'], apply_filters('ot_wpml_option_types', array('text', 'textarea', 'textarea-simple')))) {
                             $_string = icl_t('Theme Options', $option_id, $options[$option_id]);
                             if (!empty($_string)) {
                                 $options[$option_id] = $_string;
                             }
                         }
                     }
                 }
             }
         }
     }
     return $options[$option_id];
 }
开发者ID:giorgioriccardi,项目名称:hueman,代码行数:45,代码来源:ot-functions.php


注:本文中的ot_settings_id函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。