From 3dae9f04437037b07832e322746d3cc06c753777 Mon Sep 17 00:00:00 2001 From: Braad Date: Thu, 30 Apr 2015 14:52:22 -0700 Subject: [PATCH] Formatting --- includes/admin/customizer.php | 308 ++++++++++++------------- includes/functions/theme-functions.php | 10 +- 2 files changed, 159 insertions(+), 159 deletions(-) diff --git a/includes/admin/customizer.php b/includes/admin/customizer.php index 59df250..ddd0383 100644 --- a/includes/admin/customizer.php +++ b/includes/admin/customizer.php @@ -58,90 +58,90 @@ function trestle_customizer_controls( $wp_customize ) { ) ); $wp_customize->add_control( - 'trestle_layout_control', - array( - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[layout]', - 'label' => __( 'Layout', 'trestle' ), - 'type' => 'radio', - 'choices' => array( - 'bubble' => __( 'Bubble', 'trestle' ), - 'solid' => __( 'Solid', 'trestle' ), - ) - ) - ); + 'trestle_layout_control', + array( + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[layout]', + 'label' => __( 'Layout', 'trestle' ), + 'type' => 'radio', + 'choices' => array( + 'bubble' => __( 'Bubble', 'trestle' ), + 'solid' => __( 'Solid', 'trestle' ), + ) + ) + ); // Upload a logo. - $wp_customize->add_setting( - 'trestle-settings[logo_url]', - array( - 'default' => genesis_get_option( 'logo_url', 'trestle-settings' ), - 'type' => 'option', - 'transport' => 'postMessage', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'trestle_logo_control', - array( - 'label' => __( 'Upload a logo', 'trestle' ), - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[logo_url]', - ) - ) - ); + $wp_customize->add_setting( + 'trestle-settings[logo_url]', + array( + 'default' => genesis_get_option( 'logo_url', 'trestle-settings' ), + 'type' => 'option', + 'transport' => 'postMessage', + 'capability' => 'edit_theme_options', + 'sanitize_callback' => 'esc_url_raw', + ) + ); + $wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'trestle_logo_control', + array( + 'label' => __( 'Upload a logo', 'trestle' ), + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[logo_url]', + ) + ) + ); - // Upload a mobile logo. - $wp_customize->add_setting( - 'trestle-settings[logo_url_mobile]', - array( - 'default' => genesis_get_option( 'logo_url_mobile', 'trestle-settings' ), - 'type' => 'option', - 'transport' => 'postMessage', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'trestle_mobile_logo_control', - array( - 'label' => __( 'Upload a mobile logo', 'trestle' ), - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[logo_url_mobile]', - ) - ) - ); + // Upload a mobile logo. + $wp_customize->add_setting( + 'trestle-settings[logo_url_mobile]', + array( + 'default' => genesis_get_option( 'logo_url_mobile', 'trestle-settings' ), + 'type' => 'option', + 'transport' => 'postMessage', + 'capability' => 'edit_theme_options', + 'sanitize_callback' => 'esc_url_raw', + ) + ); + $wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'trestle_mobile_logo_control', + array( + 'label' => __( 'Upload a mobile logo', 'trestle' ), + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[logo_url_mobile]', + ) + ) + ); - // Upload a mobile logo. - $wp_customize->add_setting( - 'trestle-settings[favicon_url]', - array( - 'default' => genesis_get_option( 'favicon_url', 'trestle-settings' ), - 'type' => 'option', - 'transport' => 'postMessage', - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - $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' => 'trestle-settings[favicon_url]', - ) - ) - ); + // Upload a mobile logo. + $wp_customize->add_setting( + 'trestle-settings[favicon_url]', + array( + 'default' => genesis_get_option( 'favicon_url', 'trestle-settings' ), + 'type' => 'option', + 'transport' => 'postMessage', + 'capability' => 'edit_theme_options', + 'sanitize_callback' => 'esc_url_raw', + ) + ); + $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' => 'trestle-settings[favicon_url]', + ) + ) + ); - // Primary nav style. - $wp_customize->add_setting( + // Primary nav style. + $wp_customize->add_setting( 'trestle-settings[nav_primary_location]', array( 'default' => genesis_get_option( 'nav_primary_location', 'trestle-settings' ), @@ -151,21 +151,21 @@ function trestle_customizer_controls( $wp_customize ) { ) ); $wp_customize->add_control( - 'trestle_nav_primary_location_control', - array( - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[nav_primary_location]', - 'label' => __( 'Menu style', 'trestle' ), - 'type' => 'select', - 'choices' => array( - 'full' => __( 'Full Width', 'trestle' ), - 'header' => __( 'Header Right', 'trestle' ), - ) - ) - ); + 'trestle_nav_primary_location_control', + array( + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[nav_primary_location]', + 'label' => __( 'Menu style', 'trestle' ), + 'type' => 'select', + 'choices' => array( + 'full' => __( 'Full Width', 'trestle' ), + 'header' => __( 'Header Right', 'trestle' ), + ) + ) + ); - // Primary nav extras. - $wp_customize->add_setting( + // Primary nav extras. + $wp_customize->add_setting( 'trestle-settings[search_in_nav]', array( 'default' => genesis_get_option( 'search_in_nav', 'trestle-settings' ), @@ -175,17 +175,17 @@ function trestle_customizer_controls( $wp_customize ) { ) ); $wp_customize->add_control( - 'trestle_custom_nav_extras_text_control', - array( - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[search_in_nav]', - 'label' => __( 'Add search to mobile navigation', 'trestle' ), - 'type' => 'checkbox', - ) - ); + 'trestle_custom_nav_extras_text_control', + array( + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[search_in_nav]', + 'label' => __( 'Add search to mobile navigation', 'trestle' ), + 'type' => 'checkbox', + ) + ); - // Blog post custom read more link text. - $wp_customize->add_setting( + // Blog post custom read more link text. + $wp_customize->add_setting( 'trestle-settings[read_more_text]', array( 'default' => genesis_get_option( 'read_more_text', 'trestle-settings' ), @@ -196,16 +196,16 @@ function trestle_customizer_controls( $wp_customize ) { ) ); $wp_customize->add_control( - 'trestle_read_more_text_control', - array( - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[read_more_text]', - 'label' => __( 'Custom read more link text', 'trestle' ), - ) - ); + 'trestle_read_more_text_control', + array( + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[read_more_text]', + 'label' => __( 'Custom read more link text', 'trestle' ), + ) + ); - // Post revisions number. - $wp_customize->add_setting( + // Post revisions number. + $wp_customize->add_setting( 'trestle-settings[revisions_number]', array( 'default' => genesis_get_option( 'revisions_number', 'trestle-settings' ), @@ -215,31 +215,31 @@ function trestle_customizer_controls( $wp_customize ) { ) ); $wp_customize->add_control( - 'trestle_revisions_number_control', - array( - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[revisions_number]', - 'label' => __( 'Number of post revisions', 'trestle' ), - 'type' => 'select', - 'choices' => array( - '-1' => __( 'Unlimited', 'trestle' ), - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - '6' => '6', - '7' => '7', - '8' => '8', - '9' => '9', - '10' => '10', - ) - ) - ); + 'trestle_revisions_number_control', + array( + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[revisions_number]', + 'label' => __( 'Number of post revisions', 'trestle' ), + 'type' => 'select', + 'choices' => array( + '-1' => __( 'Unlimited', 'trestle' ), + '0' => '0', + '1' => '1', + '2' => '2', + '3' => '3', + '4' => '4', + '5' => '5', + '6' => '6', + '7' => '7', + '8' => '8', + '9' => '9', + '10' => '10', + ) + ) + ); - // Footer Widget Areas. - $wp_customize->add_setting( + // Footer Widget Areas. + $wp_customize->add_setting( 'trestle-settings[footer_widgets_number]', array( 'default' => genesis_get_option( 'footer_widgets_number', 'trestle-settings' ), @@ -249,26 +249,26 @@ function trestle_customizer_controls( $wp_customize ) { ) ); $wp_customize->add_control( - 'trestle_footer_widgets_number_control', - array( - 'section' => 'trestle_settings_section', - 'settings' => 'trestle-settings[footer_widgets_number]', - 'label' => __( 'Number of footer widgets', 'trestle' ), - 'type' => 'select', - 'choices' => array( - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - '6' => '6', - ) - ) - ); + 'trestle_footer_widgets_number_control', + array( + 'section' => 'trestle_settings_section', + 'settings' => 'trestle-settings[footer_widgets_number]', + 'label' => __( 'Number of footer widgets', 'trestle' ), + 'type' => 'select', + 'choices' => array( + '0' => '0', + '1' => '1', + '2' => '2', + '3' => '3', + '4' => '4', + '5' => '5', + '6' => '6', + ) + ) + ); // Add a label for the link icons. - $wp_customize->add_setting( + $wp_customize->add_setting( 'trestle-settings[link_icons_title]', array( 'default' => '', diff --git a/includes/functions/theme-functions.php b/includes/functions/theme-functions.php index 3fc2787..1e20c98 100644 --- a/includes/functions/theme-functions.php +++ b/includes/functions/theme-functions.php @@ -21,8 +21,8 @@ add_action( 'init', 'trestle_load_bfa' ); */ function trestle_load_bfa() { - // Set the library initialization args. - $args = array( + // Set the library initialization args. + $args = array( 'version' => 'latest', 'minified' => true, 'remove_existing_fa' => false, @@ -30,10 +30,10 @@ function trestle_load_bfa() { 'load_admin_styles' => true, 'load_shortcode' => true, 'load_tinymce_plugin' => true, - ); + ); - // Initialize the Better Font Awesome Library. - Better_Font_Awesome_Library::get_instance( $args ); + // Initialize the Better Font Awesome Library. + Better_Font_Awesome_Library::get_instance( $args ); }