Changeset 48077 for trunk/src/wp-admin/themes.php
- Timestamp:
- 06/17/2020 11:58:15 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/themes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/themes.php
r48062 r48077 550 550 551 551 <?php 552 553 /** 554 * Returns the template for displaying the auto-update setting for a theme. 555 * 556 * @since 5.5.0 557 * 558 * @return string Template 559 */ 560 function wp_theme_auto_update_setting_template() { 561 $template = ' 562 <p class="theme-autoupdate"> 563 <# if ( data.autoupdate ) { #> 564 <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="disable"> 565 <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span> 566 <span class="label">' . __( 'Disable auto-updates' ) . '</span> 567 </a> 568 <# } else { #> 569 <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="enable"> 570 <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span> 571 <span class="label">' . __( 'Enable auto-updates' ) . '</span> 572 </a> 573 <# } #> 574 <# if ( data.hasUpdate ) { #> 575 <# if ( data.autoupdate ) { #> 576 <span class="auto-update-time"> 577 <# } else { #> 578 <span class="auto-update-time hidden"> 579 <# } #> 580 <br />' . wp_get_auto_update_message() . '</span> 581 <# } #> 582 <span class="auto-updates-error hidden"><p></p></span> 583 </p> 584 '; 585 586 /** 587 * Filters the JavaScript template used in Backbone to display the auto-update setting for a theme (in the overlay). 588 * 589 * See {@see wp_prepare_themes_for_js()} for the properties of the `data` object. 590 * 591 * @since 5.5.0 592 * 593 * @param string $template The template for displaying the auto-update setting link. 594 */ 595 return apply_filters( 'theme_auto_update_setting_template', $template ); 596 } 597 552 598 /* 553 599 * The tmpl-theme template is synchronized with PHP above! … … 649 695 650 696 <# if ( data.actions.autoupdate ) { #> 651 <p class="theme-autoupdate"> 652 <# if ( data.autoupdate ) { #> 653 <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="disable"> 654 <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span> 655 <span class="label"><?php _e( 'Disable auto-updates' ); ?></span> 656 </a> 657 <# } else { #> 658 <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="enable"> 659 <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span> 660 <span class="label"><?php _e( 'Enable auto-updates' ); ?></span> 661 </a> 662 <# } #> 663 <# if ( data.hasUpdate ) { #> 664 <# if ( data.autoupdate) { #> 665 <span class="auto-update-time"><br /><?php echo wp_get_auto_update_message(); ?></span> 666 <# } else { #> 667 <span class="auto-update-time hidden"><br /><?php echo wp_get_auto_update_message(); ?></span> 668 <# } #> 669 <# } #> 670 <span class="auto-updates-error hidden"><p></p></span> 671 </p> 697 <?php echo wp_theme_auto_update_setting_template(); ?> 672 698 <# } #> 673 699
Note: See TracChangeset
for help on using the changeset viewer.