當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Redux::getField方法代碼示例

本文整理匯總了PHP中Redux::getField方法的典型用法代碼示例。如果您正苦於以下問題:PHP Redux::getField方法的具體用法?PHP Redux::getField怎麽用?PHP Redux::getField使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Redux的用法示例。


在下文中一共展示了Redux::getField方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: kadence_remove_sections

function kadence_remove_sections()
{
    if (!class_exists('Redux')) {
        return;
    }
    if (ReduxFramework::$_version <= '3.5.6') {
        return;
    }
    $pinnacle = get_option('pinnacle');
    if (isset($pinnacle['kadence_woo_extension']) && $pinnacle['kadence_woo_extension'] == '0') {
        //sections
        Redux::removeSection('pinnacle', 'shop_settings');
        Redux::removeSection('pinnacle', 'product_settings');
        //topbar
        Redux::removefield('pinnacle', 'show_cartcount');
        //home layout
        Redux::removefield('pinnacle', 'info_product_feat_settings');
        Redux::removefield('pinnacle', 'product_title');
        Redux::removefield('pinnacle', 'home_product_feat_column');
        Redux::removefield('pinnacle', 'home_product_count');
        Redux::removefield('pinnacle', 'home_product_feat_scroll');
        Redux::removefield('pinnacle', 'home_product_feat_speed');
        Redux::removefield('pinnacle', 'info_product_sale_settings');
        Redux::removefield('pinnacle', 'product_sale_title');
        Redux::removefield('pinnacle', 'home_product_sale_count');
        Redux::removefield('pinnacle', 'home_product_sale_scroll');
        Redux::removefield('pinnacle', 'home_product_sale_speed');
        Redux::removefield('pinnacle', 'info_product_best_settings');
        Redux::removefield('pinnacle', 'product_best_title');
        Redux::removefield('pinnacle', 'home_product_best_column');
        Redux::removefield('pinnacle', 'home_product_best_count');
        Redux::removefield('pinnacle', 'home_product_best_scroll');
        Redux::removefield('pinnacle', 'home_product_best_speed');
        // Breadcrumbs
        Redux::removefield('pinnacle', 'show_breadcrumbs_shop');
        Redux::removefield('pinnacle', 'show_breadcrumbs_product');
        Redux::removefield('pinnacle', 'shop_breadcrumbs');
        // Menu
        Redux::removefield('pinnacle', 'menu_cart');
        // language
        Redux::removefield('pinnacle', 'cart_placeholder_text');
        Redux::removefield('pinnacle', 'sold_placeholder_text');
        Redux::removefield('pinnacle', 'sale_placeholder_text');
        Redux::removefield('pinnacle', 'shop_filter_text');
        Redux::removefield('pinnacle', 'description_tab_text');
        Redux::removefield('pinnacle', 'description_header_text');
        Redux::removefield('pinnacle', 'additional_information_tab_text');
        Redux::removefield('pinnacle', 'additional_information_header_text');
        Redux::removefield('pinnacle', 'video_tab_text');
        Redux::removefield('pinnacle', 'video_title_text');
        Redux::removefield('pinnacle', 'reviews_tab_text');
        Redux::removefield('pinnacle', 'related_products_text');
        //update feild
        $field = Redux::getField('pinnacle', 'homepage_layout');
        unset($field['options']['disabled']['block_three']);
        unset($field['options']['disabled']['block_nine']);
        unset($field['options']['disabled']['block_ten']);
        Redux::setField('pinnacle', $field);
        add_filter('kadence_widget_carousel_types', 'kadence_unset_product_from_carousel');
        function kadence_unset_product_from_carousel($types)
        {
            unset($types['featured-products']);
            unset($types['sale-products']);
            unset($types['best-products']);
            unset($types['cat-products']);
            return $types;
        }
    }
    if (isset($pinnacle['kadence_portfolio_extension']) && $pinnacle['kadence_portfolio_extension'] == '0') {
        Redux::removeSection('pinnacle', 'portfolio_options');
        Redux::removefield('pinnacle', 'info_portfolio_settings');
        Redux::removefield('pinnacle', 'portfolio_title');
        Redux::removefield('pinnacle', 'portfolio_type');
        Redux::removefield('pinnacle', 'home_portfolio_carousel_column');
        Redux::removefield('pinnacle', 'home_port_car_layoutstyle');
        Redux::removefield('pinnacle', 'home_port_car_hoverstyle');
        Redux::removefield('pinnacle', 'home_port_car_imageratio');
        Redux::removefield('pinnacle', 'home_portfolio_carousel_count');
        Redux::removefield('pinnacle', 'home_portfolio_carousel_speed');
        Redux::removefield('pinnacle', 'home_portfolio_carousel_scroll');
        Redux::removefield('pinnacle', 'home_portfolio_order');
        Redux::removefield('pinnacle', 'portfolio_car_fullwidth');
        Redux::removefield('pinnacle', 'portfolio_car_lightbox');
        Redux::removefield('pinnacle', 'portfolio_show_type');
        Redux::removefield('pinnacle', 'portfolio_show_excerpt');
        Redux::removefield('pinnacle', 'info_portfolio_full_settings');
        Redux::removefield('pinnacle', 'portfolio_full_title');
        Redux::removefield('pinnacle', 'portfolio_full_type');
        Redux::removefield('pinnacle', 'home_port_count');
        Redux::removefield('pinnacle', 'home_portfolio_full_order');
        Redux::removefield('pinnacle', 'home_port_columns');
        Redux::removefield('pinnacle', 'home_port_layoutstyle');
        Redux::removefield('pinnacle', 'home_port_hoverstyle');
        Redux::removefield('pinnacle', 'home_port_imageratio');
        Redux::removefield('pinnacle', 'portfolio_full_masonry');
        Redux::removefield('pinnacle', 'portfolio_full_filter');
        Redux::removefield('pinnacle', 'portfolio_full_fullwidth');
        Redux::removefield('pinnacle', 'home_portfolio_lightbox');
        Redux::removefield('pinnacle', 'portfolio_full_show_type');
        Redux::removefield('pinnacle', 'portfolio_full_show_excerpt');
//.........這裏部分代碼省略.........
開發者ID:pcuervo,項目名稱:od4d,代碼行數:101,代碼來源:extensions.php


注:本文中的Redux::getField方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。