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


PHP dslc_get_option函数代码示例

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


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

示例1: dslc_downloads_module_init

function dslc_downloads_module_init()
{
    if (!dslc_is_module_active('DSLC_Downloads', true)) {
        return;
    }
    $capability = dslc_get_option('lc_min_capability_downloads_m', 'dslc_plugin_options_access_control');
    if (!$capability) {
        $capability = 'publish_posts';
    }
    // With Front
    $with_front = dslc_get_option('with_front', 'dslc_plugin_options_cpt_slugs');
    if (empty($with_front)) {
        $with_front = 'disabled';
    }
    if ($with_front == 'enabled') {
        $with_front = true;
    } else {
        $with_front = false;
    }
    /**
     * Custom Post Type
     */
    register_post_type('dslc_downloads', array('menu_icon' => 'dashicons-download', 'labels' => array('name' => __('Downloads', 'dslc_string'), 'singular_name' => __('Download Item', 'dslc_string'), 'add_new' => __('Add Download Item', 'dslc_string'), 'add_new_item' => __('Add Download Item', 'dslc_string'), 'edit' => __('Edit', 'dslc_string'), 'edit_item' => __('Edit Download Item', 'dslc_string'), 'new_item' => __('New Download Item', 'dslc_string'), 'view' => __('View Download Item', 'dslc_string'), 'view_item' => __('View Download Item', 'dslc_string'), 'search_items' => __('Search Download Item', 'dslc_string'), 'not_found' => __('No Download Item found', 'dslc_string'), 'not_found_in_trash' => __('No Download Item found in Trash', 'dslc_string'), 'parent' => __('Parent Download Item', 'dslc_string')), 'public' => true, 'rewrite' => array('slug' => dslc_get_option('downloads_slug', 'dslc_plugin_options_cpt_slugs'), 'with_front' => $with_front), 'supports' => array('title', 'custom-fields', 'excerpt', 'editor', 'author', 'thumbnail', 'comments'), 'capabilities' => array('publish_posts' => $capability, 'edit_posts' => $capability, 'edit_others_posts' => $capability, 'delete_posts' => $capability, 'delete_others_posts' => $capability, 'read_private_posts' => $capability, 'edit_post' => $capability, 'delete_post' => $capability, 'read_post' => $capability)));
    /**
     * Custom Taxonomies
     */
    register_taxonomy('dslc_downloads_cats', 'dslc_downloads', array('labels' => array('name' => __('Downloads Categories', 'dslc_string'), 'singular_name' => __('Category', 'dslc_string'), 'search_items' => __('Search Categories', 'dslc_string'), 'all_items' => __('All Categories', 'dslc_string'), 'parent_item' => __('Parent Category', 'dslc_string'), 'parent_item_colon' => __('Parent Category:', 'dslc_string'), 'edit_item' => __('Edit Category', 'dslc_string'), 'update_item' => __('Update Category', 'dslc_string'), 'add_new_item' => __('Add New Category', 'dslc_string'), 'new_item_name' => __('New Category Name', 'dslc_string'), 'menu_name' => __('Categories', 'dslc_string')), 'hierarchical' => true, 'public' => true, 'rewrite' => array('slug' => dslc_get_option('downloads_cats_slug', 'dslc_plugin_options_cpt_slugs'), 'with_front' => $with_front), 'capabilities' => array('manage_terms' => $capability, 'edit_terms' => $capability, 'delete_terms' => $capability, 'assign_terms' => $capability)));
    register_taxonomy('dslc_downloads_tags', 'dslc_downloads', array('labels' => array('name' => __('Downloads Tags', 'dslc_string'), 'singular_name' => __('Tag', 'dslc_string'), 'search_items' => __('Search Tags', 'dslc_string'), 'all_items' => __('All Tags', 'dslc_string'), 'parent_item' => __('Parent Tag', 'dslc_string'), 'parent_item_colon' => __('Parent Tag:', 'dslc_string'), 'edit_item' => __('Edit Tag', 'dslc_string'), 'update_item' => __('Update Tag', 'dslc_string'), 'add_new_item' => __('Add New Tag', 'dslc_string'), 'new_item_name' => __('New Tag Name', 'dslc_string'), 'menu_name' => __('Tags', 'dslc_string')), 'hierarchical' => false, 'public' => true, 'rewrite' => array('slug' => dslc_get_option('downloads_tags_slug', 'dslc_plugin_options_cpt_slugs'), 'with_front' => $with_front), 'capabilities' => array('manage_terms' => $capability, 'edit_terms' => $capability, 'delete_terms' => $capability, 'assign_terms' => $capability)));
    /**
     * Post Options
     */
    global $dslc_var_post_options;
    $dslc_var_post_options['dslc-downloads-module-options'] = array('title' => 'Download Options', 'show_on' => 'dslc_downloads', 'options' => array(array('label' => 'Downloadable File - Self Hosted', 'descr' => 'If you want the file hosted on your server you can upload and choose it here.', 'std' => '', 'id' => 'dslc_download_file', 'type' => 'file'), array('label' => 'Downloadable File - URL', 'descr' => 'If the file is already hosted somewhere else you can set the URL to it here.', 'std' => '', 'id' => 'dslc_download_url', 'type' => 'text')));
}
开发者ID:kanawanzx,项目名称:Clone,代码行数:34,代码来源:functions.php

示例2: lbmn_footer_custom_css

 function lbmn_footer_custom_css()
 {
     global $dslc_active;
     global $dslc_css_style;
     global $content_width;
     global $dslc_googlefonts_array;
     global $dslc_post_types;
     $composer_code = '';
     $template_code = '';
     $lc_width = dslc_get_option('lc_max_width', 'dslc_plugin_options');
     if (empty($lc_width)) {
         $lc_width = $content_width . 'px';
     } else {
         if (strpos($lc_width, 'px') === false && strpos($lc_width, '%') === false) {
             $lc_width = $lc_width . 'px';
         }
     }
     echo "\n<!-- Custom Footer Styles -->\n";
     echo '<style type="text/css">';
     // Get composer code
     $post_id = get_the_ID();
     $footer_post_id = lbmn_get_footerid_by_pageid($post_id);
     $composer_code .= get_post_meta($footer_post_id, 'dslc_code', true);
     // If no home page set and blog posts listed on the front
     // output LiveComposer CSS for front page too
     if (is_front_page() && get_option('page_on_front', 0) == 0) {
         $template_post_id = get_theme_mod('lbmn_systempage_frontpage_posts', lbmn_get_page_by_title(LBMN_SYSTEMPAGE_FRONTPAGE_POSTS_DEFAULT, 'lbmn_archive'));
         $composer_code .= get_post_meta($template_post_id, 'dslc_code', true);
     }
     // If composer not used on this page stop execution
     if ($composer_code) {
         // Replace shortcode names
         $composer_code = str_replace('dslc_modules_section', 'dslc_modules_section_gen_css', $composer_code);
         $composer_code = str_replace('dslc_modules_area', 'dslc_modules_area_gen_css', $composer_code);
         $composer_code = str_replace('[dslc_module]', '[dslc_module_gen_css]', $composer_code);
         $composer_code = str_replace('[/dslc_module]', '[/dslc_module_gen_css]', $composer_code);
         // Do CSS shortcode
         do_shortcode($composer_code);
         // Google Fonts Import
         $googlefonts_output = '';
         foreach ($dslc_googlefonts_array as $googlefont) {
             $googlefont = str_replace(' ', '+', $googlefont);
             if ($googlefont != '') {
                 $googlefonts_output .= '@import url("//fonts.googleapis.com/css?family=' . $googlefont . ':100,200,300,400,500,600,700,800,900&subset=latin,latin-ext"); ';
             }
         }
         echo $googlefonts_output;
     }
     // Wrapper width
     echo '.dslc-modules-section-wrapper, .dslca-add-modules-section { width : ' . $lc_width . '; } ';
     // Echo CSS style
     if (!$dslc_active && $composer_code) {
         // $dslc_css_style = str_replace('#dslc-content', '#site-footer', $dslc_css_style);
         echo $dslc_css_style;
     }
     echo '</style>';
 }
开发者ID:shimion,项目名称:localinsurance-theme,代码行数:57,代码来源:livecomposer-footer.php

示例3: dslc_nav_menus

/**
 * Register Menus
 *
 * @since 1.1
 */
function dslc_nav_menus()
{
    $menus = dslc_get_option('menus', 'dslc_plugin_options_navigation_m');
    if ($menus !== '') {
        $menus_array = explode(',', substr($menus, 0, -1));
        foreach ($menus_array as $menu) {
            $menu_ID = 'dslc_' . strtolower(str_replace(' ', '_', $menu));
            register_nav_menu($menu_ID, $menu);
        }
    }
}
开发者ID:kanawanzx,项目名称:Clone,代码行数:16,代码来源:functions.php

示例4: dslc_sidebars

function dslc_sidebars()
{
    $sidebars = dslc_get_option('sidebars', 'dslc_plugin_options_widgets_m');
    if ($sidebars !== '') {
        $sidebars_array = explode(',', substr($sidebars, 0, -1));
        foreach ($sidebars_array as $sidebar) {
            $sidebar_ID = 'dslc_' . strtolower(str_replace(' ', '_', $sidebar));
            register_sidebar(array('name' => $sidebar, 'id' => $sidebar_ID, 'before_widget' => '<div id="%1$s" class="dslc-widget dslc-col %2$s"><div class="dslc-widget-wrap">', 'after_widget' => '</div></div>', 'before_title' => apply_filters('dslc_sidebar_before_title', '<h3 class="dslc-widget-title"><span class="dslc-widget-title-inner">'), 'after_title' => apply_filters('dslc_sidebar_after_title', '</span></h3>')));
        }
    }
}
开发者ID:NGorco,项目名称:Live-Composer,代码行数:11,代码来源:functions.php

示例5: dslc_editing_screen

/**
 * Register hidden page in WP Admin used as a wrapper for LC editing.
 *
 * Create /wp-admin/admin.php?page=livecomposer_editor&page_id=XX page.
 * Page has no menu item in WP Admin Panel.
 *
 * @since 1.1
 */
function dslc_editing_screen()
{
    global $dslc_plugin_options;
    $capability = dslc_get_option('lc_min_capability_page', 'dslc_plugin_options_access_control');
    if (!$capability) {
        $capability = 'publish_posts';
    }
    // Base 64 encoded SVG image.
    $icon_svg = dslc_get_menu_svg();
    add_menu_page(__('Live Composer Editing', 'live-composer-page-builder'), __('Live Composer Editing', 'live-composer-page-builder'), $capability, 'livecomposer_editor', 'dslc_editing_screen_content', $icon_svg, '99');
    remove_menu_page('livecomposer_editor', 'livecomposer_editor');
}
开发者ID:NGorco,项目名称:Live-Composer,代码行数:20,代码来源:editing-screen.php

示例6: lbmn_footer_custom_css

 function lbmn_footer_custom_css()
 {
     global $dslc_active;
     global $dslc_css_style;
     global $content_width;
     global $dslc_googlefonts_array;
     global $dslc_post_types;
     $composer_code = '';
     $template_code = '';
     $lc_width = dslc_get_option('lc_max_width', 'dslc_plugin_options');
     if (empty($lc_width)) {
         $lc_width = $content_width . 'px';
     } else {
         if (strpos($lc_width, 'px') === false && strpos($lc_width, '%') === false) {
             $lc_width = $lc_width . 'px';
         }
     }
     // echo "\n<!-- Custom Footer Styles -->\n";
     // echo '<style type="text/css">';
     // Get composer code
     $post_id = get_the_ID();
     $footer_post_id = lbmn_get_footerid_by_pageid($post_id);
     $composer_code .= get_post_meta($footer_post_id, 'dslc_code', true);
     // If no home page set and blog posts listed on the front
     // output LiveComposer CSS for front page too
     if (is_front_page() && get_option('page_on_front', 0) == 0) {
         $template_post_id = get_theme_mod('lbmn_systempage_frontpage_posts', lbmn_get_page_by_title(LBMN_SYSTEMPAGE_FRONTPAGE_POSTS_DEFAULT, 'lbmn_archive'));
         $composer_code .= get_post_meta($template_post_id, 'dslc_code', true);
     }
     // If composer not used on this page stop execution
     if ($composer_code) {
         // Urge the Live Composer to generate CSS code
         add_filter('dslc_generate_custom_css', 'lbmn_enable_custom_css_generation');
         function lbmn_enable_custom_css_generation()
         {
             return true;
         }
         // Replace shortcode names
         $composer_code = str_replace('dslc_modules_section', 'dslc_modules_section_gen_css', $composer_code);
         $composer_code = str_replace('dslc_modules_area', 'dslc_modules_area_gen_css', $composer_code);
         $composer_code = str_replace('[dslc_module]', '[dslc_module_gen_css]', $composer_code);
         $composer_code = str_replace('[dslc_module ', '[dslc_module_gen_css ', $composer_code);
         $composer_code = str_replace('[/dslc_module]', '[/dslc_module_gen_css]', $composer_code);
         // Do CSS shortcode
         do_shortcode($composer_code);
         add_action('wp_footer', 'dslc_custom_css');
     }
     if (is_front_page() && get_option('page_on_front', 0) == 0) {
         // dslc_dynamic_css_hook();
     }
 }
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:51,代码来源:livecomposer-footer.php

示例7: dslc_st_init

/**
 * "st" in function names stands for "single template", that's what the functions are related to
 */
function dslc_st_init()
{
    $capability = dslc_get_option('lc_min_capability_page', 'dslc_plugin_options_access_control');
    if (!$capability) {
        $capability = 'publish_posts';
    }
    register_post_type('dslc_templates', array('menu_icon' => 'dashicons-admin-page', 'labels' => array('name' => __('Templates', 'dslc_string'), 'singular_name' => __('Template', 'dslc_string'), 'add_new' => __('Add Template', 'dslc_string'), 'add_new_item' => __('Add Template', 'dslc_string'), 'edit' => __('Edit', 'dslc_string'), 'edit_item' => __('Edit Template', 'dslc_string'), 'new_item' => __('New Template', 'dslc_string'), 'view' => __('View Templates', 'dslc_string'), 'view_item' => __('View Template', 'dslc_string'), 'search_items' => __('Search Templates', 'dslc_string'), 'not_found' => __('No Templates found', 'dslc_string'), 'not_found_in_trash' => __('No Templates found in Trash', 'dslc_string'), 'parent' => __('Parent Template', 'dslc_string')), 'public' => true, 'supports' => array('title', 'custom-fields', 'thumbnail'), 'capabilities' => array('publish_posts' => $capability, 'edit_posts' => $capability, 'edit_others_posts' => $capability, 'delete_posts' => $capability, 'delete_others_posts' => $capability, 'read_private_posts' => $capability, 'edit_post' => $capability, 'delete_post' => $capability, 'read_post' => $capability)));
    global $dslc_var_post_options;
    // Generate the choices
    global $dslc_var_templates_pt;
    $pt_choices = array();
    foreach ($dslc_var_templates_pt as $pt_id => $pt_label) {
        $pt_choices[] = array('label' => $pt_label, 'value' => $pt_id);
    }
    $dslc_var_post_options['dslc-templates-opts'] = array('title' => 'Template Options', 'show_on' => 'dslc_templates', 'options' => array(array('label' => __('Post Type', 'dslc_string'), 'descr' => __('Which post type is this template for?', 'dslc_string'), 'std' => '', 'id' => 'dslc_template_for', 'type' => 'select', 'choices' => $pt_choices), array('label' => __('Base', 'dslc_string'), 'descr' => __('If set to <strong>theme template</strong> the template will be appeneded to the regular single post template ( ex. If the theme shows thumbnail and title in it\'s template they will still be there ). If set to <strong>plugin template</strong> everything will be stripped and only the content from this template shown.', 'dslc_string'), 'std' => 'theme', 'id' => 'dslc_template_base', 'type' => 'select', 'choices' => array(array('label' => 'Theme Template', 'value' => 'theme'), array('label' => 'Custom Template', 'value' => 'custom'))), array('label' => __('Type', 'dslc_string'), 'std' => 'regular', 'descr' => __('<strong>Default</strong> template will be used as the default for all the posts. <strong>Regular</strong> template is an additional template that you can set to specific posts.', 'dslc_string'), 'id' => 'dslc_template_type', 'type' => 'radio', 'choices' => array(array('label' => 'Regular', 'value' => 'regular'), array('label' => 'Default', 'value' => 'default')))));
}
开发者ID:kanawanzx,项目名称:Clone,代码行数:19,代码来源:functions.php

示例8: dslc_tut_modal

/**
 * Display modal for the tutorial
 *
 * @since 1.0
 */
function dslc_tut_modal()
{
    $tut_ch_one = dslc_get_option('lc_tut_chapter_one', 'dslc_plugin_options_tuts');
    $tut_ch_two = dslc_get_option('lc_tut_chapter_two', 'dslc_plugin_options_tuts');
    $tut_ch_three = dslc_get_option('lc_tut_chapter_three', 'dslc_plugin_options_tuts');
    $tut_ch_four = dslc_get_option('lc_tut_chapter_four', 'dslc_plugin_options_tuts');
    $tut_ids = array($tut_ch_one, $tut_ch_two, $tut_ch_three, $tut_ch_four);
    if (is_singular() && isset($_GET['dslc']) && $_GET['dslc'] == 'active' && in_array(get_the_ID(), $tut_ids)) {
        $tut_ch_two_link = add_query_arg(array('dslc' => 'active'), get_permalink($tut_ch_two));
        $tut_ch_three_link = add_query_arg(array('dslc' => 'active'), get_permalink($tut_ch_three));
        $tut_ch_four_link = add_query_arg(array('dslc' => 'active'), get_permalink($tut_ch_four));
        ?>
			<input type="hidden" name="dslc_tut_settings" id="dslc_tut_settings" data-post-id="<?php 
        echo get_the_ID();
        ?>
" />
			<input type="hidden" name="dslc_tut_ch_one" id="dslc_tut_ch_one" data-post-id="<?php 
        echo $tut_ch_one;
        ?>
" />
			<input type="hidden" name="dslc_tut_ch_two" id="dslc_tut_ch_two" data-post-id="<?php 
        echo $tut_ch_two;
        ?>
" />
			<input type="hidden" name="dslc_tut_ch_three" id="dslc_tut_ch_three" data-post-id="<?php 
        echo $tut_ch_three;
        ?>
" />
			<input type="hidden" name="dslc_tut_ch_four" id="dslc_tut_ch_four" data-post-id="<?php 
        echo $tut_ch_four;
        ?>
" />
			<input type="hidden" name="dslc_tut_ch_two_link" id="dslc_tut_ch_two_link" data-url="<?php 
        echo $tut_ch_two_link;
        ?>
" />
			<input type="hidden" name="dslc_tut_ch_three_link" id="dslc_tut_ch_three_link" data-url="<?php 
        echo $tut_ch_three_link;
        ?>
" />
			<input type="hidden" name="dslc_tut_ch_four_link" id="dslc_tut_ch_four_link" data-url="<?php 
        echo $tut_ch_four_link;
        ?>
" />
		<?php 
    }
}
开发者ID:neruub,项目名称:onetonclub,代码行数:52,代码来源:tutorial.php

示例9: sklc_ppcw_apply

/**
 * Apply per page content width
 *
 * @since 1.0
 */
function sklc_ppcw_apply($lc_width)
{
    // Post types that support templates
    global $dslc_post_types;
    $new_width = $lc_width;
    $post_ID = false;
    // If single, load template
    if (is_singular($dslc_post_types)) {
        $post_ID = dslc_st_get_template_ID(get_the_ID());
    }
    // If archive, load template
    if (is_archive() && !is_author() && !is_search()) {
        $post_ID = dslc_get_option(get_post_type(), 'dslc_plugin_options_archives');
    }
    // If author archives
    if (is_author()) {
        $post_ID = dslc_get_option('author', 'dslc_plugin_options_archives');
    }
    // If search results page
    if (is_search()) {
        $post_ID = dslc_get_option('search_results', 'dslc_plugin_options_archives');
    }
    // If 404 page
    if (is_404()) {
        $post_ID = dslc_get_option('404_page', 'dslc_plugin_options_archives');
    }
    // If a page or post template
    if (is_singular(array('page', 'dslc_templates'))) {
        $post_ID = get_the_ID();
    }
    // If we have a post ID
    if ($post_ID) {
        // Get custom width
        $custom_width = get_post_meta($post_ID, 'sklc_ppcw_content_width', true);
        // If custom width set
        if ($custom_width) {
            // Set new width
            $new_width = $custom_width;
            // If px or % not included add px
            if (strpos($new_width, 'px') === false && strpos($new_width, '%') === false) {
                $new_width = $new_width . 'px';
            }
        }
    }
    return $new_width;
}
开发者ID:jessicahawkins3344,项目名称:SquarelyV.1,代码行数:51,代码来源:custom-composer.php

示例10: dslc_partners_module_cpt

/**
 * Register Post Types and Taxonomies
 *
 * @since 1.0
 */
function dslc_partners_module_cpt()
{
    // If module not active return
    if (!dslc_is_module_active('DSLC_Partners', true)) {
        return;
    }
    // Get capability
    $capability = dslc_get_option('lc_min_capability_partners_m', 'dslc_plugin_options_access_control');
    if (!$capability) {
        $capability = 'publish_posts';
    }
    // With Front
    $with_front = dslc_get_option('with_front', 'dslc_plugin_options_cpt_slugs');
    if (empty($with_front)) {
        $with_front = 'disabled';
    }
    if ($with_front == 'enabled') {
        $with_front = true;
    } else {
        $with_front = false;
    }
    /**
     * Register Post Type
     */
    // Arguments
    $cpt_args = array('menu_icon' => 'dashicons-groups', 'labels' => array('name' => __('Partners', 'live-composer-page-builder'), 'singular_name' => __('Partner', 'live-composer-page-builder'), 'add_new' => __('Add Partner', 'live-composer-page-builder'), 'add_new_item' => __('Add Partner', 'live-composer-page-builder'), 'edit' => __('Edit', 'live-composer-page-builder'), 'edit_item' => __('Edit Partner', 'live-composer-page-builder'), 'new_item' => __('New Partner', 'live-composer-page-builder'), 'view' => __('View Partner', 'live-composer-page-builder'), 'view_item' => __('View Partner', 'live-composer-page-builder'), 'search_items' => __('Search Partner', 'live-composer-page-builder'), 'not_found' => __('No Partner found', 'live-composer-page-builder'), 'not_found_in_trash' => __('No Partner found in Trash', 'live-composer-page-builder'), 'parent' => __('Parent Partner', 'live-composer-page-builder')), 'public' => true, 'rewrite' => array('slug' => dslc_get_option('partners_slug', 'dslc_plugin_options_cpt_slugs'), 'with_front' => $with_front), 'supports' => array('title', 'custom-fields', 'excerpt', 'editor', 'author', 'thumbnail', 'comments'), 'capabilities' => array('publish_posts' => $capability, 'edit_posts' => $capability, 'edit_others_posts' => $capability, 'delete_posts' => $capability, 'delete_others_posts' => $capability, 'read_private_posts' => $capability, 'edit_post' => $capability, 'delete_post' => $capability, 'read_post' => $capability));
    // Apply filters
    $cpt_args = apply_filters('dslc_partners_cpt_args', $cpt_args);
    // Register post type
    register_post_type('dslc_partners', $cpt_args);
    /**
     * Register Taxonomy ( Category )
     */
    // Arguments
    $cats_args = array('labels' => array('name' => __('Partners Categories', 'live-composer-page-builder'), 'singular_name' => __('Category', 'live-composer-page-builder'), 'search_items' => __('Search Categories', 'live-composer-page-builder'), 'all_items' => __('All Categories', 'live-composer-page-builder'), 'parent_item' => __('Parent Category', 'live-composer-page-builder'), 'parent_item_colon' => __('Parent Category:', 'live-composer-page-builder'), 'edit_item' => __('Edit Category', 'live-composer-page-builder'), 'update_item' => __('Update Category', 'live-composer-page-builder'), 'add_new_item' => __('Add New Category', 'live-composer-page-builder'), 'new_item_name' => __('New Category Name', 'live-composer-page-builder'), 'menu_name' => __('Categories', 'live-composer-page-builder')), 'hierarchical' => true, 'public' => true, 'rewrite' => array('slug' => dslc_get_option('partners_cats_slug', 'dslc_plugin_options_cpt_slugs'), 'with_front' => $with_front));
    // Apply filters
    $cats_args = apply_filters('dslc_partners_cats_args', $cats_args);
    // Register taxonomy
    register_taxonomy('dslc_partners_cats', 'dslc_partners', $cats_args);
}
开发者ID:webeau,项目名称:Live-Composer,代码行数:45,代码来源:functions.php

示例11: dslc_timeline_module_cpt

function dslc_timeline_module_cpt()
{
    if (!dslc_is_module_active('AS_Timeline', true)) {
        return;
    }
    $capability = dslc_get_option('lc_min_capability_timeline_m', 'dslc_plugin_options_access_control');
    if (!$capability) {
        $capability = 'publish_posts';
    }
    // With Front
    $with_front = dslc_get_option('with_front', 'dslc_plugin_options_cpt_slugs');
    if (empty($with_front)) {
        $with_front = 'disabled';
    }
    if ($with_front == 'enabled') {
        $with_front = true;
    } else {
        $with_front = false;
    }
    register_post_type('dslc_timeline', array('menu_icon' => 'dashicons-feedback', 'labels' => array('name' => __('Timeline', 'dslc_string'), 'singular_name' => __('Timeline', 'dslc_string'), 'add_new' => __('Add Timeline', 'dslc_string'), 'add_new_item' => __('Add Timeline', 'dslc_string'), 'edit' => __('Edit', 'dslc_string'), 'edit_item' => __('Edit Timeline', 'dslc_string'), 'new_item' => __('New Timeline', 'dslc_string'), 'view' => __('View Timeline', 'dslc_string'), 'view_item' => __('View Timeline', 'dslc_string'), 'search_items' => __('Search Timeline', 'dslc_string'), 'not_found' => __('No Timeline found', 'dslc_string'), 'not_found_in_trash' => __('No Timeline found in Trash', 'dslc_string'), 'parent' => __('Parent Timeline', 'dslc_string')), 'public' => true, 'rewrite' => array('slug' => dslc_get_option('timeline_slug', 'dslc_plugin_options_cpt_slugs'), 'with_front' => $with_front), 'supports' => array('title', 'custom-fields', 'excerpt', 'editor', 'author', 'thumbnail', 'comments'), 'capabilities' => array('publish_posts' => $capability, 'edit_posts' => $capability, 'edit_others_posts' => $capability, 'delete_posts' => $capability, 'delete_others_posts' => $capability, 'read_private_posts' => $capability, 'edit_post' => $capability, 'delete_post' => $capability, 'read_post' => $capability)));
    register_taxonomy('dslc_timeline_cats', 'dslc_timeline', array('labels' => array('name' => __('Timeline Categories', 'dslc_string'), 'singular_name' => __('Category', 'dslc_string'), 'search_items' => __('Search Categories', 'dslc_string'), 'all_items' => __('All Categories', 'dslc_string'), 'parent_item' => __('Parent Category', 'dslc_string'), 'parent_item_colon' => __('Parent Category:', 'dslc_string'), 'edit_item' => __('Edit Category', 'dslc_string'), 'update_item' => __('Update Category', 'dslc_string'), 'add_new_item' => __('Add New Category', 'dslc_string'), 'new_item_name' => __('New Category Name', 'dslc_string'), 'menu_name' => __('Categories', 'dslc_string')), 'hierarchical' => true, 'public' => true, 'rewrite' => array('slug' => dslc_get_option('timeline_cats_slug', 'dslc_plugin_options_cpt_slugs'), 'with_front' => $with_front), 'capabilities' => array('manage_terms' => $capability, 'edit_terms' => $capability, 'delete_terms' => $capability, 'assign_terms' => $capability)));
}
开发者ID:bibiangel1989,项目名称:vespatour,代码行数:22,代码来源:functions.php

示例12: dslc_is_module_active

/**
 * Check if module is active
 */
function dslc_is_module_active($module_id, $check_registered = false)
{
    global $dslc_var_modules;
    if ('disabled' === dslc_get_option($module_id, 'dslc_plugin_options_features')) {
        return false;
    } elseif (true === $check_registered && !isset($dslc_var_modules[$module_id])) {
        return false;
    } else {
        return true;
    }
}
开发者ID:NGorco,项目名称:Live-Composer,代码行数:14,代码来源:functions.php

示例13: dslc_get_option

include DS_LIVE_COMPOSER_ABS . '/includes/ajax.php';
include DS_LIVE_COMPOSER_ABS . '/includes/shortcodes.php';
include DS_LIVE_COMPOSER_ABS . '/includes/scripts.php';
include DS_LIVE_COMPOSER_ABS . '/includes/post-options-framework/post-options-framework.php';
include DS_LIVE_COMPOSER_ABS . '/includes/plugin-options-framework/plugin-options-framework.php';
include DSLC_ST_FRAMEWORK_ABS . '/single-templates-framework.php';
include DS_LIVE_COMPOSER_ABS . '/includes/access-control.php';
include DS_LIVE_COMPOSER_ABS . '/includes/performance.php';
include DS_LIVE_COMPOSER_ABS . '/includes/archive-templates.php';
include DS_LIVE_COMPOSER_ABS . '/includes/tutorials/tutorial.php';
include DS_LIVE_COMPOSER_ABS . '/includes/styling-presets.php';
include DS_LIVE_COMPOSER_ABS . '/includes/header-footer.php';
include DS_LIVE_COMPOSER_ABS . '/includes/search-filter.php';
include DS_LIVE_COMPOSER_ABS . '/includes/post-templates.php';
include DS_LIVE_COMPOSER_ABS . '/includes/other.php';
$cap_page = dslc_get_option('lc_min_capability_page', 'dslc_plugin_options_access_control');
if (!$cap_page) {
    $cap_page = 'publish_posts';
}
define('DS_LIVE_COMPOSER_CAPABILITY', $cap_page);
define('DS_LIVE_COMPOSER_CAPABILITY_SAVE', $cap_page);
/**
 * Include Modules
 */
include DS_LIVE_COMPOSER_ABS . '/includes/class.module.php';
include DS_LIVE_COMPOSER_ABS . '/modules/posts/module.php';
include DS_LIVE_COMPOSER_ABS . '/modules/blog/module.php';
include DS_LIVE_COMPOSER_ABS . '/modules/projects/module.php';
include DS_LIVE_COMPOSER_ABS . '/modules/galleries/module.php';
include DS_LIVE_COMPOSER_ABS . '/modules/infobox/module.php';
include DS_LIVE_COMPOSER_ABS . '/modules/staff/module.php';
开发者ID:andershagbard,项目名称:Live-Composer,代码行数:31,代码来源:ds-live-composer.php

示例14: dslc_dynamic_css_hook

function dslc_dynamic_css_hook()
{
    $dynamic_css_location = dslc_get_option('lc_css_position', 'dslc_plugin_options');
    if (!$dynamic_css_location) {
        $dynamic_css_location = 'head';
    }
    if ($dynamic_css_location == 'head') {
        add_action('wp_head', 'dslc_custom_css');
    } else {
        add_action('wp_footer', 'dslc_custom_css');
    }
}
开发者ID:xtiger15x,项目名称:Live-Composer-Lumbermandesigns,代码行数:12,代码来源:display-functions.php

示例15: dslc_ajax_display_module_options


//.........这里部分代码省略.........
                echo $module_option['affect_on_change_el'];
                ?>
" data-affect-on-change-rule="<?php 
                echo $module_option['affect_on_change_rule'];
                ?>
" <?php 
                if ($default_value) {
                    ?>
 data-default="<?php 
                    echo $default_value;
                    ?>
" <?php 
                }
                ?>
 />

					<?php 
            } elseif ($module_option['type'] == 'slider') {
                ?>

						<?php 
                $slider_min = 0;
                $slider_max = 100;
                $slider_increment = 1;
                if (isset($module_option['min'])) {
                    $slider_min = $module_option['min'];
                }
                if (isset($module_option['max'])) {
                    $slider_max = $module_option['max'];
                }
                if (isset($module_option['increment'])) {
                    $slider_increment = $module_option['increment'];
                }
                $numeric_option_type = dslc_get_option('lc_numeric_opt_type', 'dslc_plugin_options_other');
                if (empty($numeric_option_type)) {
                    $numeric_option_type = 'slider';
                }
                ?>

						<?php 
                if ($numeric_option_type == 'slider') {
                    ?>

							<div class="dslca-module-edit-field-slider"></div>
							<span class="dslca-module-edit-field-slider-tooltip"><?php 
                    echo $curr_value;
                    ?>
</span>
							<input type="hidden" class="dslca-module-edit-field" name="<?php 
                    echo $module_option['id'];
                    ?>
" data-id="<?php 
                    echo $module_option['id'];
                    ?>
" value="<?php 
                    echo $curr_value;
                    ?>
" data-affect-on-change-el="<?php 
                    echo $module_option['affect_on_change_el'];
                    ?>
" data-affect-on-change-rule="<?php 
                    echo $module_option['affect_on_change_rule'];
                    ?>
" data-min="<?php 
                    echo $slider_min;
                    ?>
开发者ID:bibiangel1989,项目名称:vespatour,代码行数:67,代码来源:ajax.php


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