Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 3.0 Register another setting, "company_website"
- $wp_customize->add_setting( 'company_website',
- array(
- 'default' => '',
- 'type' => 'theme_mod',
- 'capability' => 'edit_theme_options',
- 'transport' => 'refresh',
- )
- );
- // 3.1 Define an input for the new "company_website" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_company_website_control',
- array(
- 'label' => __( 'Company Address', 'mytheme' ),
- 'settings' => 'company_website',
- 'type' => 'text',
- 'section' => 'ts_company_details',
- )
- ) );
- // 3.0 Register another setting, "company_address"
- $wp_customize->add_setting( 'company_address',
- array(
- 'default' => '',
- 'type' => 'theme_mod',
- 'capability' => 'edit_theme_options',
- 'transport' => 'refresh',
- )
- );
- // 3.1 Define an input for the new "company_address" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_company_address_control',
- array(
- 'label' => __( 'Company Address', 'mytheme' ),
- 'settings' => 'company_address',
- 'type' => 'textarea',
- 'section' => 'ts_company_details',
- )
- ) );
- // 3.0 Register another setting, "copyright"
- $wp_customize->add_setting( 'copyright',
- array(
- 'default' => '',
- 'type' => 'theme_mod',
- 'capability' => 'edit_theme_options',
- 'transport' => 'refresh',
- )
- );
- // 3.1 Define an input for the new "copyright" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_company_copyright_control',
- array(
- 'label' => __( 'Copyright', 'mytheme' ),
- 'settings' => 'copyright',
- 'type' => 'textarea',
- 'section' => 'ts_company_details',
- )
- ) );
- /*
- * Social media
- * Started
- *
- */
- // Define a new section for the Appearance -> Customize page
- $wp_customize->add_section( 'ts_social_details',
- array(
- 'title' => __( 'Social Media', 'liccabe_options' ),
- 'priority' => 1, // Determines what order this appears in (1 = top)
- 'capability' => 'edit_theme_options', // Capability needed to tweak
- 'description' => __('Set your Social Media details.', 'liccabe_options'),
- )
- );
- // 2.0 Register the new "company_name" setting
- $wp_customize->add_setting( 'liccabe_facebook', // id of the setting, no need to prefix when using 'theme_mod' as type
- array(
- 'default' => '', // Default setting/value to save
- 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
- 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
- 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
- )
- );
- // 2.1 Define an input for the "company_name" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_liccabe_facebook_control', // unique ID for the control
- array(
- 'label' => __( 'Facebook URL', 'liccabe_options' ),
- 'settings' => 'liccabe_facebook', // id of previously created setting "company_name"
- 'type' => 'text',
- 'section' => 'ts_social_details', // ID of our "Company Details" section
- )
- ) );
- // 2.0 Register the new "company_name" setting
- $wp_customize->add_setting( 'liccabe_twitter', // id of the setting, no need to prefix when using 'theme_mod' as type
- array(
- 'default' => '', // Default setting/value to save
- 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
- 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
- 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
- )
- );
- // 2.1 Define an input for the "company_name" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_liccabe_twitter_control', // unique ID for the control
- array(
- 'label' => __( 'Twitter URL', 'liccabe_options' ),
- 'settings' => 'liccabe_twitter', // id of previously created setting "company_name"
- 'type' => 'text',
- 'section' => 'ts_social_details', // ID of our "Company Details" section
- )
- ) );
- // 2.0 Register the new "company_name" setting
- $wp_customize->add_setting( 'liccabe_gplus', // id of the setting, no need to prefix when using 'theme_mod' as type
- array(
- 'default' => '', // Default setting/value to save
- 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
- 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
- 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
- )
- );
- // 2.1 Define an input for the "company_name" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_liccabe_gplus_control', // unique ID for the control
- array(
- 'label' => __( 'Goole Plus URL', 'liccabe_options' ),
- 'settings' => 'liccabe_gplus', // id of previously created setting "company_name"
- 'type' => 'text',
- 'section' => 'ts_social_details', // ID of our "Company Details" section
- )
- ) );
- // 2.0 Register the new "company_name" setting
- $wp_customize->add_setting( 'liccabe_dribble', // id of the setting, no need to prefix when using 'theme_mod' as type
- array(
- 'default' => '', // Default setting/value to save
- 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
- 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
- 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
- )
- );
- // 2.1 Define an input for the "company_name" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_liccabe_dribble_control', // unique ID for the control
- array(
- 'label' => __( 'Dribble URL', 'liccabe_options' ),
- 'settings' => 'liccabe_dribble', // id of previously created setting "company_name"
- 'type' => 'text',
- 'section' => 'ts_social_details', // ID of our "Company Details" section
- )
- ) );
- // 2.0 Register the new "company_name" setting
- $wp_customize->add_setting( 'liccabe_behance', // id of the setting, no need to prefix when using 'theme_mod' as type
- array(
- 'default' => '', // Default setting/value to save
- 'type' => 'theme_mod', // 'theme_mod' or 'option'. [print-theme-settings] only supports theme related settings (theme_mod)
- 'capability' => 'edit_theme_options', // Optional. Special permissions for accessing this setting.
- 'transport' => 'refresh', // What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant).
- )
- );
- // 2.1 Define an input for the "company_name" setting
- $wp_customize->add_control( new WP_Customize_Control(
- $wp_customize,
- 'ts_liccabe_behance_control', // unique ID for the control
- array(
- 'label' => __( 'Behance URL', 'liccabe_options' ),
- 'settings' => 'liccabe_behance', // id of previously created setting "company_name"
- 'type' => 'text',
- 'section' => 'ts_social_details', // ID of our "Company Details" section
- )
- ) );
- }
Add Comment
Please, Sign In to add comment