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


PHP dokan_get_option函数代码示例

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


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

示例1: output_meta_tags

 /**
  * Adds proper hooks for output of meta tags
  *
  * @return void
  */
 function output_meta_tags()
 {
     if (!dokan_is_store_page()) {
         return;
     }
     if (dokan_get_option('store_seo', 'dokan_general') === 'off') {
         return;
     }
     $this->store_info = dokan_get_store_info(get_query_var('author'));
     if (class_exists('All_in_One_SEO_Pack')) {
         add_filter('aioseop_title', array($this, 'replace_title'), 500);
         add_filter('aioseop_keywords', array($this, 'replace_keywords'), 100);
         add_filter('aioseop_description', array($this, 'replace_desc'), 100);
         add_action('wp_head', array($this, 'print_social_tags'), 1);
     } elseif (class_exists('WPSEO_Frontend')) {
         add_filter('wp_title', array($this, 'replace_title'), 500);
         add_filter('wpseo_metakeywords', array($this, 'replace_keywords'));
         add_filter('wpseo_metadesc', array($this, 'replace_desc'));
         add_filter('wpseo_opengraph_title', array($this, 'replace_og_title'));
         add_filter('wpseo_opengraph_desc', array($this, 'replace_og_desc'));
         add_filter('wpseo_opengraph_image', array($this, 'replace_og_img'));
         add_action('wpseo_opengraph', array($this, 'print_og_img'), 20);
         add_filter('wpseo_twitter_title', array($this, 'replace_twitter_title'));
         add_filter('wpseo_twitter_description', array($this, 'replace_twitter_desc'));
         add_filter('wpseo_twitter_image', array($this, 'replace_twitter_img'));
         add_action('wpseo_twitter', array($this, 'print_twitter_img'), 20);
     } else {
         add_filter('wp_title', array($this, 'replace_title'), 500);
         add_action('wp_head', array($this, 'print_tags'), 1);
         add_action('wp_head', array($this, 'print_social_tags'), 1);
     }
 }
开发者ID:CPHollister,项目名称:shyftmodels,代码行数:37,代码来源:store-seo.php

示例2: render_new_product_template

 /**
  * Render New Product Template
  *
  * @since 2.4
  *
  * @param  array $query_vars
  *
  * @return void
  */
 public function render_new_product_template($query_vars)
 {
     if (isset($query_vars['new-product'])) {
         if (dokan_get_option('product_style', 'dokan_selling', 'old') == 'old') {
             dokan_get_template_part('products/new-product', '', array('pro' => true));
         } else {
             dokan_get_template_part('products/new-product-single');
         }
     }
 }
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:19,代码来源:products.php

示例3: __construct

 /**
  * Hook into the functions
  */
 public function __construct()
 {
     $this->custom_store_url = dokan_get_option('custom_store_url', 'dokan_selling', 'store');
     add_action('init', array($this, 'register_rule'));
     add_filter('template_include', array($this, 'store_template'));
     add_filter('template_include', array($this, 'store_review_template'));
     add_filter('template_include', array($this, 'product_edit_template'));
     add_filter('query_vars', array($this, 'register_query_var'));
     add_filter('pre_get_posts', array($this, 'store_query_filter'));
     add_filter('woocommerce_locate_template', array($this, 'account_migration_template'));
 }
开发者ID:abcode619,项目名称:wpstuff,代码行数:14,代码来源:rewrites.php

示例4: load_settings_menu

 /**
  * Load Settings Menu for Pro
  *
  * @since 2.4
  *
  * @param  array $sub_settins
  *
  * @return array
  */
 public function load_settings_menu($sub_settins)
 {
     $dokan_shipping_option = get_option('woocommerce_dokan_product_shipping_settings');
     $enable_shipping = isset($dokan_shipping_option['enabled']) ? $dokan_shipping_option['enabled'] : 'yes';
     if ($enable_shipping == 'yes') {
         $sub_settins['shipping'] = array('title' => __('Shipping', 'dokan'), 'icon' => '<i class="fa fa-truck"></i>', 'url' => dokan_get_navigation_url('settings/shipping'), 'pos' => 70);
     }
     $sub_settins['social'] = array('title' => __('Social Profile', 'dokan'), 'icon' => '<i class="fa fa-share-alt-square"></i>', 'url' => dokan_get_navigation_url('settings/social'), 'pos' => 90);
     if (dokan_get_option('store_seo', 'dokan_general', 'on') === 'on') {
         $sub_settins['seo'] = array('title' => __('Store SEO', 'dokan'), 'icon' => '<i class="fa fa-globe"></i>', 'url' => dokan_get_navigation_url('settings/seo'), 'pos' => 110);
     }
     return $sub_settins;
 }
开发者ID:nealmattox,项目名称:updatednebrowse,代码行数:22,代码来源:settings.php

示例5: tokopress_dokan_layout_class

function tokopress_dokan_layout_class($layout)
{
    if (dokan_is_store_page()) {
        if (dokan_get_option('enable_theme_store_sidebar', 'dokan_general', 'off') == 'off') {
            $layout = 'layout-2c-l';
        } else {
            if (!of_get_option('tokopress_wc_hide_products_sidebar')) {
                $layout = 'layout-2c-l';
            } else {
                $layout = 'layout-1c-full';
            }
        }
    }
    return $layout;
}
开发者ID:Artgorae,项目名称:wp-artgorae,代码行数:15,代码来源:plugin-dokan.php

示例6: __construct

 /**
  * Load autometically when class inistantiate
  *
  * @since 2.4
  *
  * @uses actions|filter hooks
  */
 public function __construct()
 {
     $this->quick_edit = dokan_get_option('review_edit', 'dokan_selling', 'off') == 'on' ? true : false;
     add_filter('dokan_get_dashboard_nav', array($this, 'add_review_menu'));
     add_action('dokan_load_custom_template', array($this, 'load_review_template'));
     add_action('dokan_review_content_inside_before', array($this, 'show_seller_enable_message'));
     add_action('dokan_review_content_area_header', array($this, 'dokan_review_header_render'), 10);
     add_action('dokan_review_content', array($this, 'dokan_review_content_render'), 10);
     add_action('dokan_review_content_status_filter', array($this, 'dokan_review_status_filter'), 10, 2);
     add_action('dokan_review_content_listing', array($this, 'dokan_review_content_listing'), 10, 2);
     add_action('dokan_review_listing_table_body', array($this, 'dokan_render_listing_table_body'), 10);
     add_action('dokan_review_content_inside_after', array($this, 'dokan_render_listing_table_script_template'), 10);
     add_action('template_redirect', array($this, 'handle_status'), 10);
     add_action('wp_ajax_dokan_comment_status', array($this, 'ajax_comment_status'));
     add_action('wp_ajax_dokan_update_comment', array($this, 'ajax_update_comment'));
 }
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:23,代码来源:reviews.php

示例7: dokan_withdraw_get_active_methods

/**
 * Get active withdraw methods.
 *
 * Default is paypal
 *
 * @return array
 */
function dokan_withdraw_get_active_methods()
{
    $methods = dokan_get_option('withdraw_methods', 'dokan_selling', array('paypal'));
    return $methods;
}
开发者ID:nuwe1,项目名称:dokan-lite,代码行数:12,代码来源:withdraw-functions.php

示例8: __construct

 public function __construct()
 {
     $this->quick_edit = dokan_get_option('review_edit', 'dokan_selling', 'off') == 'on' ? true : false;
 }
开发者ID:abcode619,项目名称:wpstuff,代码行数:4,代码来源:template-reviews.php

示例9: process_order

 /**
  * Mark a order as processing
  *
  * Fires from frontend seller dashboard
  */
 function process_order()
 {
     if (!is_admin()) {
         die;
     }
     if (!current_user_can('dokandar') && dokan_get_option('order_status_change', 'dokan_selling', 'on') != 'on') {
         wp_die(__('You do not have sufficient permissions to access this page.', 'dokan'));
     }
     if (!check_admin_referer('dokan-mark-order-processing')) {
         wp_die(__('You have taken too long. Please go back and retry.', 'dokan'));
     }
     $order_id = isset($_GET['order_id']) && (int) $_GET['order_id'] ? (int) $_GET['order_id'] : '';
     if (!$order_id) {
         die;
     }
     if (!dokan_is_seller_has_order(get_current_user_id(), $order_id)) {
         wp_die(__('You do not have permission to change this order', 'dokan'));
     }
     $order = new WC_Order($order_id);
     $order->update_status('processing');
     wp_safe_redirect(wp_get_referer());
 }
开发者ID:nuwe1,项目名称:dokan-lite,代码行数:27,代码来源:ajax.php

示例10: dokan_myorder_login_check

/**
 * Redirect My order in Login page without user logged login
 *
 * @since 2.4
 *
 * @return [redirect]
 */
function dokan_myorder_login_check()
{
    global $post;
    if (!$post) {
        return;
    }
    if (!isset($post->ID)) {
        return;
    }
    $my_order_page_id = dokan_get_option('my_orders', 'dokan_pages');
    if ($my_order_page_id == $post->ID) {
        dokan_redirect_login();
    }
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:21,代码来源:template-tags.php

示例11: add_dashboard_template_class

 /**
  * Add body class for dokan-dashboard
  *
  * @param array $classes
  */
 function add_dashboard_template_class($classes)
 {
     $page_id = dokan_get_option('dashboard', 'dokan_pages');
     if (!$page_id) {
         return $classes;
     }
     if (is_page($page_id) || get_query_var('edit') && is_singular('product')) {
         $classes[] = 'dokan-dashboard';
     }
     if (dokan_is_store_page()) {
         $classes[] = 'dokan-store';
     }
     $classes[] = 'dokan-theme-' . get_option('template');
     return $classes;
 }
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:20,代码来源:dokan.php

示例12: do_action

if (dokan_get_option('enable_theme_store_sidebar', 'dokan_general', 'off') == 'off') {
    ?>
        <div id="dokan-secondary" class="dokan-clearfix dokan-w3 dokan-store-sidebar" role="complementary" style="margin-right:3%;">
            <div class="dokan-widget-area widget-collapse">
                 <?php 
    do_action('dokan_sidebar_store_before', $store_user, $store_info);
    ?>
                <?php 
    if (!dynamic_sidebar('sidebar-store')) {
        $args = array('before_widget' => '<aside class="widget">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>');
        if (class_exists('Dokan_Store_Location')) {
            the_widget('Dokan_Store_Category_Menu', array('title' => __('Store Category', 'dokan')), $args);
            if (dokan_get_option('store_map', 'dokan_general', 'on') == 'on') {
                the_widget('Dokan_Store_Location', array('title' => __('Store Location', 'dokan')), $args);
            }
            if (dokan_get_option('contact_seller', 'dokan_general', 'on') == 'on') {
                the_widget('Dokan_Store_Contact_Form', array('title' => __('Contact Seller', 'dokan')), $args);
            }
        }
    }
    ?>

                <?php 
    do_action('dokan_sidebar_store_after', $store_user, $store_info);
    ?>
            </div>
        </div><!-- #secondary .widget-area -->
    <?php 
} else {
    get_sidebar('store');
}
开发者ID:abcode619,项目名称:wpstuff,代码行数:31,代码来源:store.php

示例13: wc_get_template_part

                            <?php 
        wc_get_template_part('content', 'product');
        ?>

                        <?php 
    }
    ?>
                    </ul>
                </div>
            </div> <!-- .slider-container -->
        <?php 
}
?>

        <?php 
if (dokan_get_option('show_top_rated', 'dokan_home', 'on') == 'on') {
    ?>
            <div class="slider-container woocommerce">
                <h2 class="slider-heading"><?php 
    _e('Top Rated Products', 'dokan');
    ?>
</h2>

                <div class="product-sliders">
                    <ul class="slides">
                        <?php 
    $top_rated_query = dokan_get_top_rated_products();
    ?>
                        <?php 
    while ($top_rated_query->have_posts()) {
        $top_rated_query->the_post();
开发者ID:uwitec,项目名称:findgreatmaster,代码行数:31,代码来源:front-page.php

示例14: withdraw_form

    /**
     * Generate withdraw request form
     *
     * @param  string  $validate
     *
     * @return void
     */
    function withdraw_form($validate = '')
    {
        global $current_user;
        // show alert messages
        $this->show_alert_messages();
        $balance = $this->get_user_balance($current_user->ID);
        if ($balance < 0) {
            printf('<div class="dokan-alert dokan-alert-danger">%s</div>', sprintf(__('You already withdrawed %s. This amount will deducted from your next balance.', 'dokan'), wc_price($balance)));
        }
        if ($this->has_pending_request($current_user->ID)) {
            ?>
            <div class="dokan-alert dokan-alert-warning">
                <p><strong><?php 
            _e('You\'ve already pending withdraw request(s).', 'dokan');
            ?>
</strong></p>
                <p><?php 
            _e('Until it\'s been cancelled or approved, you can\'t submit any new request.', 'dokan');
            ?>
</p>
            </div>

            <?php 
            $this->withdraw_requests($current_user->ID);
            return;
        } else {
            if (!$this->has_withdraw_balance($current_user->ID)) {
                printf('<div class="dokan-alert dokan-alert-danger">%s</div>', __('You don\'t have sufficient balance for a withdraw request!', 'dokan'));
                return;
            }
        }
        $payment_methods = dokan_withdraw_get_active_methods();
        if (is_wp_error($validate)) {
            $amount = $_POST['witdraw_amount'];
            $withdraw_method = $_POST['withdraw_method'];
        } else {
            $amount = '';
            $withdraw_method = '';
        }
        ?>
        <div class="dokan-alert dokan-alert-danger" style="display: none;">
            <button type="button" class="dokan-close" data-dismiss="alert">&times;</button>
            <strong class="jquery_error_place"></strong>
        </div>

        <span class="ajax_table_shown"></span>
        <form class="dokan-form-horizontal withdraw" role="form" method="post">

            <div class="dokan-form-group">
                <label for="withdraw-amount" class="dokan-w3 dokan-control-label">
                    <?php 
        _e('Withdraw Amount', 'dokan');
        ?>
                </label>

                <div class="dokan-w5 dokan-text-left">
                    <div class="dokan-input-group">
                        <span class="dokan-input-group-addon"><?php 
        echo get_woocommerce_currency_symbol();
        ?>
</span>
                        <input name="witdraw_amount" required number min="<?php 
        echo esc_attr(dokan_get_option('withdraw_limit', 'dokan_selling', 50));
        ?>
" class="dokan-form-control" id="withdraw-amount" name="price" type="number" placeholder="0.00" value="<?php 
        echo $amount;
        ?>
"  >
                    </div>
                </div>
            </div>

            <div class="dokan-form-group">
                <label for="withdraw-method" class="dokan-w3 dokan-control-label">
                    <?php 
        _e('Payment Method', 'dokan');
        ?>
                </label>

                <div class="dokan-w5 dokan-text-left">
                    <select class="dokan-form-control" required name="withdraw_method" id="withdraw-method">
                        <?php 
        foreach ($payment_methods as $method_name) {
            ?>
                            <option <?php 
            selected($withdraw_method, $method_name);
            ?>
value="<?php 
            echo esc_attr($method_name);
            ?>
"><?php 
            echo dokan_withdraw_get_method_title($method_name);
            ?>
//.........这里部分代码省略.........
开发者ID:CPHollister,项目名称:shyftmodels,代码行数:101,代码来源:template-withdraw.php

示例15: _e

        <p class="form-row form-group form-row-wide">
            <label for="shop-phone"><?php 
_e('Phone Number', 'dokan');
?>
<span class="required">*</span></label>
            <input type="text" class="input-text form-control" name="phone" id="shop-phone" value="<?php 
if (!empty($_POST['phone'])) {
    echo esc_attr($_POST['phone']);
}
?>
" required="required" />
        </p>
        <?php 
$show_toc = dokan_get_option('enable_tc_on_reg', 'dokan_general');
if ($show_toc == 'on') {
    $toc_page_id = dokan_get_option('reg_tc_page', 'dokan_pages');
    if ($toc_page_id != -1) {
        $toc_page_url = get_permalink($toc_page_id);
        ?>
                <p class="form-row form-group form-row-wide">
                    <input class="tc_check_box" type="checkbox" id="tc_agree" name="tc_agree" required="required">
                    <label style="display: inline" for="tc_agree"><?php 
        sprintf(__('I have read and agree to the <a target="_blank" href="%s">Terms &amp; Conditions</a>.', 'dokan'), $toc_page_url);
        ?>
</label>
                </p>
            <?php 
    }
    ?>
        <?php 
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:31,代码来源:update-account.php


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