diff --git src/wp-content/themes/twentyeleven/inc/theme-options.php src/wp-content/themes/twentyeleven/inc/theme-options.php
index fd144b6..e71ab9a 100644
|
|
function twentyeleven_customize_register( $wp_customize ) { |
510 | 510 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
511 | 511 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; |
512 | 512 | |
| 513 | if ( isset( $wp_customize->selective_refresh ) ) { |
| 514 | $wp_customize->selective_refresh->add_partial( 'blogname', array( |
| 515 | 'selector' => '#site-title a', |
| 516 | 'container_inclusive' => false, |
| 517 | 'render_callback' => 'twentyeleven_customize_partial_blogname', |
| 518 | ) ); |
| 519 | $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
| 520 | 'selector' => '#site-description', |
| 521 | 'container_inclusive' => false, |
| 522 | 'render_callback' => 'twentyeleven_customize_partial_blogdescription', |
| 523 | ) ); |
| 524 | } |
| 525 | |
513 | 526 | $options = twentyeleven_get_theme_options(); |
514 | 527 | $defaults = twentyeleven_get_default_theme_options(); |
515 | 528 | |
… |
… |
function twentyeleven_customize_register( $wp_customize ) { |
575 | 588 | add_action( 'customize_register', 'twentyeleven_customize_register' ); |
576 | 589 | |
577 | 590 | /** |
| 591 | * Render the site title for the selective refresh partial. |
| 592 | * |
| 593 | * @since Twenty Eleven 2.4 |
| 594 | * @see twentyeleven_customize_register() |
| 595 | * |
| 596 | * @return void |
| 597 | */ |
| 598 | function twentyeleven_customize_partial_blogname() { |
| 599 | bloginfo( 'name' ); |
| 600 | } |
| 601 | |
| 602 | /** |
| 603 | * Render the site tagline for the selective refresh partial. |
| 604 | * |
| 605 | * @since Twenty Eleven 2.4 |
| 606 | * @see twentyeleven_customize_register() |
| 607 | * |
| 608 | * @return void |
| 609 | */ |
| 610 | function twentyeleven_customize_partial_blogdescription() { |
| 611 | bloginfo( 'description' ); |
| 612 | } |
| 613 | |
| 614 | /** |
578 | 615 | * Bind JS handlers to make Customizer preview reload changes asynchronously. |
579 | 616 | * |
580 | 617 | * Used with blogname and blogdescription. |
diff --git src/wp-content/themes/twentyfifteen/inc/customizer.php src/wp-content/themes/twentyfifteen/inc/customizer.php
index 93b66e5..c31c57e 100644
|
|
function twentyfifteen_customize_register( $wp_customize ) { |
20 | 20 | $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
21 | 21 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
22 | 22 | |
| 23 | if ( isset( $wp_customize->selective_refresh ) ) { |
| 24 | $wp_customize->selective_refresh->add_partial( 'blogname', array( |
| 25 | 'selector' => '.site-title a', |
| 26 | 'container_inclusive' => false, |
| 27 | 'render_callback' => 'twentyfifteen_customize_partial_blogname', |
| 28 | ) ); |
| 29 | $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
| 30 | 'selector' => '.site-description', |
| 31 | 'container_inclusive' => false, |
| 32 | 'render_callback' => 'twentyfifteen_customize_partial_blogdescription', |
| 33 | ) ); |
| 34 | } |
| 35 | |
23 | 36 | // Add color scheme setting and control. |
24 | 37 | $wp_customize->add_setting( 'color_scheme', array( |
25 | 38 | 'default' => 'default', |
… |
… |
function twentyfifteen_customize_register( $wp_customize ) { |
70 | 83 | add_action( 'customize_register', 'twentyfifteen_customize_register', 11 ); |
71 | 84 | |
72 | 85 | /** |
| 86 | * Render the site title for the selective refresh partial. |
| 87 | * |
| 88 | * @since Twenty Fifteen 1.5 |
| 89 | * @see twentyfifteen_customize_register() |
| 90 | * |
| 91 | * @return void |
| 92 | */ |
| 93 | function twentyfifteen_customize_partial_blogname() { |
| 94 | bloginfo( 'name' ); |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Render the site tagline for the selective refresh partial. |
| 99 | * |
| 100 | * @since Twenty Fifteen 1.5 |
| 101 | * @see twentyfifteen_customize_register() |
| 102 | * |
| 103 | * @return void |
| 104 | */ |
| 105 | function twentyfifteen_customize_partial_blogdescription() { |
| 106 | bloginfo( 'description' ); |
| 107 | } |
| 108 | |
| 109 | /** |
73 | 110 | * Register color schemes for Twenty Fifteen. |
74 | 111 | * |
75 | 112 | * Can be filtered with {@see 'twentyfifteen_color_schemes'}. |
diff --git src/wp-content/themes/twentyfourteen/inc/customizer.php src/wp-content/themes/twentyfourteen/inc/customizer.php
index 063d54c..4522984 100644
|
|
function twentyfourteen_customize_register( $wp_customize ) { |
20 | 20 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
21 | 21 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; |
22 | 22 | |
| 23 | if ( isset( $wp_customize->selective_refresh ) ) { |
| 24 | $wp_customize->selective_refresh->add_partial( 'blogname', array( |
| 25 | 'selector' => '.site-title a', |
| 26 | 'container_inclusive' => false, |
| 27 | 'render_callback' => 'twentyfourteen_customize_partial_blogname', |
| 28 | ) ); |
| 29 | $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
| 30 | 'selector' => '.site-description', |
| 31 | 'container_inclusive' => false, |
| 32 | 'render_callback' => 'twentyfourteen_customize_partial_blogdescription', |
| 33 | ) ); |
| 34 | } |
| 35 | |
23 | 36 | // Rename the label to "Site Title Color" because this only affects the site title in this theme. |
24 | 37 | $wp_customize->get_control( 'header_textcolor' )->label = __( 'Site Title Color', 'twentyfourteen' ); |
25 | 38 | |
… |
… |
function twentyfourteen_customize_register( $wp_customize ) { |
65 | 78 | add_action( 'customize_register', 'twentyfourteen_customize_register' ); |
66 | 79 | |
67 | 80 | /** |
| 81 | * Render the site title for the selective refresh partial. |
| 82 | * |
| 83 | * @since Twenty Fourteen 1.7 |
| 84 | * @see twentyfourteen_customize_register() |
| 85 | * |
| 86 | * @return void |
| 87 | */ |
| 88 | function twentyfourteen_customize_partial_blogname() { |
| 89 | bloginfo( 'name' ); |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Render the site tagline for the selective refresh partial. |
| 94 | * |
| 95 | * @since Twenty Fourteen 1.7 |
| 96 | * @see twentyfourteen_customize_register() |
| 97 | * |
| 98 | * @return void |
| 99 | */ |
| 100 | function twentyfourteen_customize_partial_blogdescription() { |
| 101 | bloginfo( 'description' ); |
| 102 | } |
| 103 | |
| 104 | /** |
68 | 105 | * Sanitize the Featured Content layout value. |
69 | 106 | * |
70 | 107 | * @since Twenty Fourteen 1.0 |
diff --git src/wp-content/themes/twentythirteen/functions.php src/wp-content/themes/twentythirteen/functions.php
index 27b44e4..33c8efd 100644
|
|
function twentythirteen_customize_register( $wp_customize ) { |
535 | 535 | $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
536 | 536 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
537 | 537 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; |
| 538 | |
| 539 | if ( isset( $wp_customize->selective_refresh ) ) { |
| 540 | $wp_customize->selective_refresh->add_partial( 'blogname', array( |
| 541 | 'selector' => '.site-title', |
| 542 | 'container_inclusive' => false, |
| 543 | 'render_callback' => 'twentythirteen_customize_partial_blogname', |
| 544 | ) ); |
| 545 | $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
| 546 | 'selector' => '.site-description', |
| 547 | 'container_inclusive' => false, |
| 548 | 'render_callback' => 'twentythirteen_customize_partial_blogdescription', |
| 549 | ) ); |
| 550 | } |
538 | 551 | } |
539 | 552 | add_action( 'customize_register', 'twentythirteen_customize_register' ); |
540 | 553 | |
541 | 554 | /** |
| 555 | * Render the site title for the selective refresh partial. |
| 556 | * |
| 557 | * @since Twenty Thirteen 1.9 |
| 558 | * @see twentythirteen_customize_register() |
| 559 | * |
| 560 | * @return void |
| 561 | */ |
| 562 | function twentythirteen_customize_partial_blogname() { |
| 563 | bloginfo( 'name' ); |
| 564 | } |
| 565 | |
| 566 | /** |
| 567 | * Render the site tagline for the selective refresh partial. |
| 568 | * |
| 569 | * @since Twenty Thirteen 1.9 |
| 570 | * @see twentythirteen_customize_register() |
| 571 | * |
| 572 | * @return void |
| 573 | */ |
| 574 | function twentythirteen_customize_partial_blogdescription() { |
| 575 | bloginfo( 'description' ); |
| 576 | } |
| 577 | |
| 578 | /** |
542 | 579 | * Enqueue Javascript postMessage handlers for the Customizer. |
543 | 580 | * |
544 | 581 | * Binds JavaScript handlers to make the Customizer preview |
diff --git src/wp-content/themes/twentytwelve/functions.php src/wp-content/themes/twentytwelve/functions.php
index 8d5facf..63f903e 100644
|
|
function twentytwelve_customize_register( $wp_customize ) { |
480 | 480 | $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
481 | 481 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; |
482 | 482 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; |
| 483 | |
| 484 | if ( isset( $wp_customize->selective_refresh ) ) { |
| 485 | $wp_customize->selective_refresh->add_partial( 'blogname', array( |
| 486 | 'selector' => '.site-title > a', |
| 487 | 'container_inclusive' => false, |
| 488 | 'render_callback' => 'twentytwelve_customize_partial_blogname', |
| 489 | ) ); |
| 490 | $wp_customize->selective_refresh->add_partial( 'blogdescription', array( |
| 491 | 'selector' => '.site-description', |
| 492 | 'container_inclusive' => false, |
| 493 | 'render_callback' => 'twentytwelve_customize_partial_blogdescription', |
| 494 | ) ); |
| 495 | } |
483 | 496 | } |
484 | 497 | add_action( 'customize_register', 'twentytwelve_customize_register' ); |
485 | 498 | |
486 | 499 | /** |
| 500 | * Render the site title for the selective refresh partial. |
| 501 | * |
| 502 | * @since Twenty Twelve 2.0 |
| 503 | * @see twentytwelve_customize_register() |
| 504 | * |
| 505 | * @return void |
| 506 | */ |
| 507 | function twentytwelve_customize_partial_blogname() { |
| 508 | bloginfo( 'name' ); |
| 509 | } |
| 510 | |
| 511 | /** |
| 512 | * Render the site tagline for the selective refresh partial. |
| 513 | * |
| 514 | * @since Twenty Twelve 2.0 |
| 515 | * @see twentytwelve_customize_register() |
| 516 | * |
| 517 | * @return void |
| 518 | */ |
| 519 | function twentytwelve_customize_partial_blogdescription() { |
| 520 | bloginfo( 'description' ); |
| 521 | } |
| 522 | |
| 523 | /** |
487 | 524 | * Enqueue Javascript postMessage handlers for the Customizer. |
488 | 525 | * |
489 | 526 | * Binds JS handlers to make the Customizer preview reload changes asynchronously. |