コード例 #1
0
ファイル: register.php プロジェクト: lonid/skrollr
 function register_settings($wp_customize)
 {
     if (!isset($wp_customize)) {
         return;
     }
     $wp_customize->add_section('layout', array('title' => __('Page layout', 'skrollr')));
     $wp_customize->add_setting('footer_menu_layout', array('default' => 'right', 'transport' => 'postMessage', 'sanitize_callback' => array($this, 'sanitize_footer_menu_layout')));
     $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'footer_menu_layout', array('label' => __('Footer menu layout', 'skrollr'), 'section' => 'layout', 'settings' => 'footer_menu_layout', 'type' => 'select', 'choices' => array('left' => __('Left column', 'skrollr'), 'right' => __('Right column', 'skrollr')))));
     $wp_customize->add_setting('content_width', array('default' => 4, 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
     $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'content_width', array('label' => __('Content width', 'skrollr'), 'section' => 'layout', 'settings' => 'content_width', 'type' => 'range', 'input_attrs' => array('max' => 12, 'min' => 2, 'step' => 1))));
     $wp_customize->add_setting('logo_header', array('transport' => 'postMessage', 'sanitize_callback' => 'esc_url'));
     $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logo_header', array('label' => __('Homescreen logo', 'skrollr'), 'section' => 'layout', 'settings' => 'logo_header')));
     $wp_customize->add_setting('logo_header_url', array('default' => home_url(), 'transport' => 'postMessage', 'sanitize_callback' => 'esc_url'));
     $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'logo_header_url', array('label' => __('URL pointed by logo', 'skrollr'), 'section' => 'layout', 'settings' => 'logo_header_url')));
     $wp_customize->add_setting('logo_header_position', array('transport' => 'postMessage', 'sanitize_callback' => array(Skrollr_Position_Icon::get_instance(), 'sanitize_position')));
     $wp_customize->add_control(new Icon_Position_Custom_Control($wp_customize, 'logo_header_position', array('label' => __('Logo position', 'skrollr'), 'description' => __('Drag the logo around with your mouse to change its position', 'skrollr'), 'section' => 'layout', 'settings' => array('image' => 'logo_header', 'url' => 'logo_header_url', 'position' => 'logo_header_position'), 'input_attrs' => array('data-icon-id' => 'logo-header', 'data-parent-selector' => '#accueil'))));
 }
コード例 #2
0
ファイル: register.php プロジェクト: lonid/skrollr
 function __construct()
 {
     self::$instance = $this;
     add_action('customize_register', array($this, 'register_control'));
     add_action('customize_preview_init', array($this, 'live_preview'));
 }
コード例 #3
0
ファイル: chapo.php プロジェクト: lonid/skrollr
">
		<span class="slabtext"><?php 
bloginfo('name');
?>
</span>
	</h1>
	<a class="scrolldown" title="<?php 
_e('Read next ...', 'skrollr');
?>
" href="#chapo">
		<?php 
_e('go down to start', 'skrollr');
?>
	</a>
	<?php 
Skrollr_Position_Icon::get_instance()->display('logo_header', 'logo_header_url', 'logo_header_position');
?>
</header>

<div id="chapo" class="one-column clearfix row">
	<div class="title-column <?php 
echo esc_attr($class['title']);
?>
"><?php 
echo Skrollr_Header_Description::get_instance()->get_title();
?>
</div>
	<div class="text-column <?php 
echo esc_attr($class['content']);
?>
"><?php