Changeset 20912 for trunk/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 05/25/2012 07:52:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-manager.php
r20910 r20912 601 601 public function register_controls() { 602 602 603 /* Custom Header */ 604 605 $this->add_section( 'header', array( 606 'title' => __( 'Header' ), 607 'theme_supports' => 'custom-header', 608 'priority' => 20, 603 /* Site Title & Tagline */ 604 605 $this->add_section( 'title_tagline', array( 606 'title' => __( 'Site Title & Tagline' ), 607 'priority' => 20, 608 ) ); 609 610 $this->add_setting( 'blogname', array( 611 'default' => get_option( 'blogname' ), 612 'type' => 'option', 613 'capability' => 'manage_options', 614 ) ); 615 616 $this->add_control( 'blogname', array( 617 'label' => __( 'Site Title' ), 618 'section' => 'title_tagline', 619 ) ); 620 621 $this->add_setting( 'blogdescription', array( 622 'default' => get_option( 'blogdescription' ), 623 'type' => 'option', 624 'capability' => 'manage_options', 625 ) ); 626 627 $this->add_control( 'blogdescription', array( 628 'label' => __( 'Tagline' ), 629 'section' => 'title_tagline', 630 ) ); 631 632 /* Colors */ 633 634 $this->add_section( 'colors', array( 635 'title' => __( 'Colors' ), 636 'priority' => 40, 609 637 ) ); 610 638 … … 615 643 ) ); 616 644 645 // Input type: checkbox 646 // With custom value 617 647 $this->add_control( 'display_header_text', array( 618 648 'settings' => 'header_textcolor', 619 649 'label' => __( 'Display Header Text' ), 620 'section' => ' header',650 'section' => 'title_tagline', 621 651 'type' => 'checkbox', 622 652 ) ); … … 624 654 $this->add_control( new WP_Customize_Color_Control( $this, 'header_textcolor', array( 625 655 'label' => __( 'Text Color' ), 626 'section' => ' header',656 'section' => 'colors', 627 657 ) ) ); 628 629 // Input type: checkbox630 // With custom value631 $this->add_setting( 'header_image', array(632 'default' => get_theme_support( 'custom-header', 'default-image' ),633 'theme_supports' => 'custom-header',634 ) );635 636 $this->add_control( new WP_Customize_Header_Image_Control( $this ) );637 638 /* Custom Background */639 640 $this->add_section( 'background', array(641 'title' => __( 'Background' ),642 'theme_supports' => 'custom-background',643 'priority' => 30,644 ) );645 658 646 659 // Input type: Color … … 654 667 $this->add_control( new WP_Customize_Color_Control( $this, 'background_color', array( 655 668 'label' => __( 'Background Color' ), 656 'section' => ' background',669 'section' => 'colors', 657 670 ) ) ); 671 672 673 /* Custom Header */ 674 675 $this->add_section( 'header_image', array( 676 'title' => __( 'Header Image' ), 677 'theme_supports' => 'custom-header', 678 'priority' => 60, 679 ) ); 680 681 $this->add_setting( 'header_image', array( 682 'default' => get_theme_support( 'custom-header', 'default-image' ), 683 'theme_supports' => 'custom-header', 684 ) ); 685 686 $this->add_control( new WP_Customize_Header_Image_Control( $this ) ); 687 688 /* Custom Background */ 689 690 $this->add_section( 'background_image', array( 691 'title' => __( 'Background Image' ), 692 'theme_supports' => 'custom-background', 693 'priority' => 80, 694 ) ); 658 695 659 696 $this->add_setting( 'background_image', array( … … 664 701 $this->add_control( new WP_Customize_Image_Control( $this, 'background_image', array( 665 702 'label' => __( 'Background Image' ), 666 'section' => 'background ',703 'section' => 'background_image', 667 704 'context' => 'custom-background', 668 705 ) ) ); … … 675 712 $this->add_control( 'background_repeat', array( 676 713 'label' => __( 'Background Repeat' ), 677 'section' => 'background ',714 'section' => 'background_image', 678 715 'type' => 'radio', 679 716 'choices' => array( … … 692 729 $this->add_control( 'background_position_x', array( 693 730 'label' => __( 'Background Position' ), 694 'section' => 'background ',731 'section' => 'background_image', 695 732 'type' => 'radio', 696 733 'choices' => array( … … 708 745 $this->add_control( 'background_attachment', array( 709 746 'label' => __( 'Background Attachment' ), 710 'section' => 'background ',747 'section' => 'background_image', 711 748 'type' => 'radio', 712 749 'choices' => array( … … 734 771 'title' => __( 'Navigation' ), 735 772 'theme_supports' => 'menus', 736 'priority' => 40,773 'priority' => 100, 737 774 'description' => sprintf( _n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . "\n\n" . __('You can edit your menu content on the Menus screen in the Appearance section.'), 738 775 ) ); … … 769 806 'title' => __( 'Static Front Page' ), 770 807 // 'theme_supports' => 'static-front-page', 771 'priority' => 50,808 'priority' => 120, 772 809 'description' => __( 'Your theme supports a static front page.' ), 773 810 ) ); … … 813 850 'type' => 'dropdown-pages', 814 851 ) ); 815 816 /* Site Title & Tagline */817 818 $this->add_section( 'strings', array(819 'title' => __( 'Site Title & Tagline' ),820 'priority' => 5,821 ) );822 823 $this->add_setting( 'blogname', array(824 'default' => get_option( 'blogname' ),825 'type' => 'option',826 'capability' => 'manage_options',827 ) );828 829 $this->add_control( 'blogname', array(830 'label' => __( 'Site Title' ),831 'section' => 'strings',832 ) );833 834 $this->add_setting( 'blogdescription', array(835 'default' => get_option( 'blogdescription' ),836 'type' => 'option',837 'capability' => 'manage_options',838 ) );839 840 $this->add_control( 'blogdescription', array(841 'label' => __( 'Tagline' ),842 'section' => 'strings',843 ) );844 852 } 845 853 };
Note: See TracChangeset
for help on using the changeset viewer.