mirror of
https://github.com/10h30/trestle.git
synced 2026-07-13 19:56:20 +09:00
Syncing with dev branch
This commit is contained in:
@@ -35,6 +35,7 @@ function trestle_custom_defaults( $defaults ) {
|
||||
'trestle_layout' => 'solid',
|
||||
'trestle_logo_url' => '',
|
||||
'trestle_logo_url_mobile' => '',
|
||||
'trestle_favicon_url' => '',
|
||||
'trestle_nav_primary_location' => 'full',
|
||||
'trestle_read_more_text' => __( 'Read More »', 'trestle' ),
|
||||
'trestle_revisions_number' => 3,
|
||||
@@ -94,6 +95,12 @@ function trestle_register_required_plugins() {
|
||||
'required' => false,
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => 'Equal Height Columns',
|
||||
'slug' => 'equal-height-columns',
|
||||
'required' => false,
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => 'Events Manager',
|
||||
'slug' => 'events-manager',
|
||||
@@ -113,8 +120,8 @@ function trestle_register_required_plugins() {
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => 'FancyBox for WordPress',
|
||||
'slug' => 'fancybox-for-wordpress',
|
||||
'name' => 'Easy FancyBox',
|
||||
'slug' => 'easy-fancybox',
|
||||
'required' => false,
|
||||
),
|
||||
|
||||
@@ -257,4 +264,4 @@ function trestle_register_required_plugins() {
|
||||
);
|
||||
|
||||
tgmpa( $plugins, $config );
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,16 @@
|
||||
});
|
||||
});
|
||||
|
||||
// Favicon
|
||||
wp.customize( 'genesis-settings[trestle_favicon_url]', function( value ) {
|
||||
value.bind( function( url ) {
|
||||
|
||||
var $faviconElem = $( 'link[rel="Shortcut Icon"]' );
|
||||
$faviconElem.attr( 'href', url );
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
// Primary Nav Location
|
||||
wp.customize( 'genesis-settings[trestle_nav_primary_location]', function( value ) {
|
||||
value.bind( function( value ) {
|
||||
@@ -69,7 +79,7 @@
|
||||
wp.customize( 'genesis-settings[trestle_read_more_text]', function( value ) {
|
||||
value.bind( function( value ) {
|
||||
|
||||
$( 'a.more-link' ).text( value );
|
||||
$( 'a.more-link' ).html( value );
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -108,13 +108,35 @@ function trestle_customizer_controls( $wp_customize ) {
|
||||
$wp_customize,
|
||||
'trestle_mobile_logo_control',
|
||||
array(
|
||||
'label' => __( 'Upload a logo for mobile', 'trestle' ),
|
||||
'label' => __( 'Upload a mobile logo', 'trestle' ),
|
||||
'section' => 'trestle_settings_section',
|
||||
'settings' => 'genesis-settings[trestle_logo_url_mobile]',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Upload a mobile logo
|
||||
$wp_customize->add_setting(
|
||||
'genesis-settings[trestle_favicon_url]',
|
||||
array(
|
||||
'default' => genesis_get_option( 'trestle_favicon_url' ),
|
||||
'type' => 'option',
|
||||
'transport' => 'postMessage',
|
||||
'capability' => 'edit_theme_options',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
new WP_Customize_Image_Control(
|
||||
$wp_customize,
|
||||
'trestle_favicon_control',
|
||||
array(
|
||||
'label' => __( 'Upload a favicon', 'trestle' ),
|
||||
'section' => 'trestle_settings_section',
|
||||
'settings' => 'genesis-settings[trestle_favicon_url]',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// Primary nav style
|
||||
$wp_customize->add_setting(
|
||||
'genesis-settings[trestle_nav_primary_location]',
|
||||
@@ -139,6 +161,26 @@ function trestle_customizer_controls( $wp_customize ) {
|
||||
)
|
||||
);
|
||||
|
||||
// Primary nav extras
|
||||
$wp_customize->add_setting(
|
||||
'genesis-settings[trestle_custom_nav_extras_text]',
|
||||
array(
|
||||
'default' => genesis_get_option( 'trestle_custom_nav_extras_text' ),
|
||||
'type' => 'option',
|
||||
'transport' => 'postMessage',
|
||||
'capability' => 'edit_theme_options',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'trestle_custom_nav_extras_text_control',
|
||||
array(
|
||||
'section' => 'trestle_settings_section',
|
||||
'settings' => 'genesis-settings[trestle_custom_nav_extras_text]',
|
||||
'label' => __( 'Add search to mobile navigation', 'trestle' ),
|
||||
'type' => 'checkbox',
|
||||
)
|
||||
);
|
||||
|
||||
// Blog post custom read more link text
|
||||
$wp_customize->add_setting(
|
||||
'genesis-settings[trestle_read_more_text]',
|
||||
|
||||
Reference in New Issue
Block a user