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


PHP wpgrade::get_redux_sections方法代碼示例

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


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

示例1: array

<?php

/**
 * Generate all the css declared in customizer's config
 * ====== DO NOT EDIT BELOW!!! =======
 * If you need to add custom css rules add them above so we can keep track of them
 */
$redux_sections = wpgrade::get_redux_sections();
/**
*======= TYPOGRAPHY


$fonts = array();

if ( isset( $fonts['google_menu_page_font'] ) ) {
	// this needs a default
	$font_size = '14px'; ?>
	html body.jassy_menu_page p, html body.jassy_menu_page span, html body.jassy_menu_page h4, html body.jassy_menu_page h2 {
	<?php wpgrade::display_font_params( $fonts['google_menu_page_font'] ); ?>
	}
<?php }
*/
//handle the complicated logic of the footer waves that keeps changing color
$footer_sidebar_style = wpgrade::option('footer_sidebar_style');
$waves_fill_color = '#121212';
switch ($footer_sidebar_style) {
    case 'light':
        $waves_fill_color = '#ffffff';
        break;
    case 'dark':
        $waves_fill_color = '#121212';
開發者ID:andreilupu,項目名稱:jassyro-rosa-child-theme,代碼行數:31,代碼來源:inline-custom-css.php

示例2: reset_style_section

 /**
  * This is a wpgrade specific hook!
  * @TODO Maybe refactor it in the future to work in redux extension
  */
 public function reset_style_section()
 {
     check_ajax_referer('reset-style-section', 'security');
     $defaults = wpgrade::get_redux_defaults();
     $sections = wpgrade::get_redux_sections();
     if (!empty($sections)) {
         foreach ($sections as $section) {
             if (isset($section['type']) && $section['type'] == 'customizer_section' && isset($section['fields']) && !empty($section['fields'])) {
                 foreach ($section['fields'] as $field) {
                     if (isset($field['id']) && isset($defaults[$field['id']])) {
                         $default_value = $defaults[$field['id']];
                         wpgrade::setoption($field['id'], $default_value);
                     }
                 }
             }
         }
     }
 }
開發者ID:pwzCypher,項目名稱:wp-push,代碼行數:22,代碼來源:extension_customizer.php


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