本文整理汇总了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';
示例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);
}
}
}
}
}
}