Added mobile breakpoint option
This commit is contained in:
parent
2ee6939455
commit
c3a57ae0a0
@ -128,7 +128,7 @@ if ( !wp_style_is( 'font-awesome.min.css', 'enqueued' ) ) {
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-menu-style', get_template_directory_uri() . '/styles/menumaker.css', 'atticus-finch-style', '0.4', 'screen' );
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-mobile', get_stylesheet_directory_uri() . '/styles/mobile.css', 'atticus-finch-style', '0.4', 'screen and (max-width: 640px)' );
|
||||
wp_enqueue_style( 'atticus-finch-mobile', get_stylesheet_directory_uri() . '/styles/mobile.css', 'atticus-finch-style', '0.4', 'screen and (max-width: '. get_theme_mod( 'atticus_finch_mobile_breakpoint' ) . 'px)' );
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-print', get_stylesheet_directory_uri() . '/styles/print.css', 'atticus-finch-style', '0.4', 'print' );
|
||||
|
||||
|
@ -672,7 +672,7 @@ $default_copyright = '<a rel="license" href="http://creativecommons.org/licenses
|
||||
'title' => __( 'Mobile Menu Options', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 110,
|
||||
'description' => __('Menu settings for mobile appearance.', 'atticus-finch'),
|
||||
'description' => __('Menu settings for mobile appearance. <b>Note:</b> The breakpoint settings will override the "mobile breakpoint" setting.', 'atticus-finch'),
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
@ -815,6 +815,20 @@ $default_copyright = '<a rel="license" href="http://creativecommons.org/licenses
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 100,
|
||||
'panel' => 'atticusfinch',
|
||||
'description' => 'Fine-tune your mobile appearance',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_mobile_breakpoint', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'default' => '640',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_int',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_mobile_breakpoint', array(
|
||||
'section' => 'atticus_finch_mobile',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Breakpoint to display mobile version of theme', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_post_top_link', array(
|
||||
|
Loading…
Reference in New Issue
Block a user