Changeset 6604 for trunk/src/includes/admin/classes/class-bbp-admin.php
- Timestamp:
- 06/26/2017 12:29:31 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/classes/class-bbp-admin.php
r6602 r6604 533 533 $version = bbp_get_version(); 534 534 535 // Register the JS 535 // Footer JS 536 wp_register_script( 'bbp-admin-badge-js', $this->js_url . 'badge' . $suffix . '.js', array(), $version, true ); 537 538 // Header JS 536 539 wp_register_script( 'bbp-admin-common-js', $this->js_url . 'common' . $suffix . '.js', array( 'jquery', 'suggest' ), $version ); 537 540 wp_register_script( 'bbp-admin-topics-js', $this->js_url . 'topics' . $suffix . '.js', array( 'jquery' ), $version ); … … 541 544 // Post type checker (only topics and replies) 542 545 if ( 'post' === get_current_screen()->base ) { 543 544 546 switch ( get_current_screen()->post_type ) { 545 547 case bbp_get_reply_post_type() : … … 560 562 break; 561 563 } 564 565 // Enqueue the badge JS 566 } elseif ( in_array( get_current_screen()->id, array( 'dashboard_page_bbp-about', 'dashboard_page_bbp-credits' ), true ) ) { 567 wp_enqueue_script( 'bbp-admin-badge-js' ); 562 568 } 563 569 } … … 728 734 729 735 /** 736 * Output the shared screen header for about_screen() & credits_screen() 737 * 738 * Contains title, subtitle, and badge area 739 * 740 * @since 2.6.0 bbPress (r6604) 741 */ 742 private function screen_header() { 743 list( $display_version ) = explode( '-', bbp_get_version() ); ?> 744 745 <h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1> 746 <div class="about-text"><?php printf( esc_html__( 'bbPress is fun to use, contains no artificial colors or preservatives, and is absolutely wonderful in every environment. Your community is going to love using it.', 'bbpress' ), $display_version ); ?></div> 747 748 <span class="bbp-hive" id="bbp-hive"></span> 749 <div class="bbp-badge" id="bbp-badge"> 750 <span class="bbp-bee" id="bbp-bee"></span> 751 </div> 752 753 <?php 754 } 755 756 /** 730 757 * Output the about screen 731 758 * 732 759 * @since 2.2.0 bbPress (r4159) 760 * 761 * @todo Host this remotely. 733 762 */ 734 763 public function about_screen() { 735 736 list( $display_version ) = explode( '-', bbp_get_version() ); ?> 764 ?> 737 765 738 766 <div class="wrap about-wrap"> 739 <h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1> 740 <div class="about-text"><?php printf( esc_html__( 'Thank you for updating! bbPress %s is sweet and savory, contains no artificial flavors or preservatives, is environmentally friendly, and is a great compliment to your site.', 'bbpress' ), $display_version ); ?></div> 741 <div class="bbp-badge"></div> 767 768 <?php $this->screen_header(); ?> 742 769 743 770 <h2 class="nav-tab-wrapper"> … … 804 831 * Output the credits screen 805 832 * 806 * Hardcoding this in here is pretty janky. It's fine for now, but we'll807 * want to leverage api.wordpress.org eventually.808 *809 833 * @since 2.2.0 bbPress (r4159) 834 * 835 * @todo Host this remotely. 810 836 */ 811 837 public function credits_screen() { 812 813 list( $display_version ) = explode( '-', bbp_get_version() ); ?> 838 ?> 814 839 815 840 <div class="wrap about-wrap"> 816 <h1><?php printf( esc_html__( 'Welcome to bbPress %s', 'bbpress' ), $display_version ); ?></h1> 817 <div class="about-text"><?php printf( esc_html__( 'Thank you for updating! bbPress %s is sweet and savory, contains no artificial flavors or preservatives, is environmentally friendly, and is a great compliment to your site.', 'bbpress' ), $display_version ); ?></div> 818 <div class="bbp-badge"></div> 841 842 <?php $this->screen_header(); ?> 819 843 820 844 <h2 class="nav-tab-wrapper">
Note: See TracChangeset
for help on using the changeset viewer.