PageRenderTime 41ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-admin/about.php

https://gitlab.com/Gashler/sg
PHP | 208 lines | 163 code | 29 blank | 16 comment | 5 complexity | 83c2cc7bd7304ccb0a636766316d7f09 MD5 | raw file
  1. <?php
  2. /**
  3. * About This Version administration panel.
  4. *
  5. * @package WordPress
  6. * @subpackage Administration
  7. */
  8. /** WordPress Administration Bootstrap */
  9. require_once( dirname( __FILE__ ) . '/admin.php' );
  10. wp_enqueue_style( 'wp-mediaelement' );
  11. wp_enqueue_script( 'wp-mediaelement' );
  12. wp_localize_script( 'mediaelement', '_wpmejsSettings', array(
  13. 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
  14. 'pauseOtherPlayers' => ''
  15. ) );
  16. $title = __( 'About' );
  17. list( $display_version ) = explode( '-', $wp_version );
  18. include( ABSPATH . 'wp-admin/admin-header.php' );
  19. $video_url = 'https://videopress.com/embed/T54Iy7Tw';
  20. $locale = str_replace( '_', '-', get_locale() );
  21. if ( 'en-AU' !== $locale ) {
  22. list( $locale ) = explode( '-', $locale );
  23. }
  24. if ( 'en' !== $locale ) {
  25. $video_url = add_query_arg( 'defaultLangCode', $locale, $video_url );
  26. }
  27. $major_features = array(
  28. array(
  29. 'src' => array(
  30. 'mp4' => '//s.w.org/images/core/4.3/formatting.mp4',
  31. 'ogv' => '//s.w.org/images/core/4.3/formatting.ogv',
  32. 'webm' => '//s.w.org/images/core/4.3/formatting.webm',
  33. ),
  34. 'heading' => __( 'Formatting Shortcuts' ),
  35. /* Translators: 1: asterisks; 2: number sign; */
  36. 'description' => sprintf( __( 'Your writing flow just got faster with new formatting shortcuts in WordPress 4.3. Use asterisks to create lists and number signs to make a heading. No more breaking your flow; your text looks great with a %1$s and a %2$s.' ), '<code>*</code>', '<code>#</code>' ),
  37. ),
  38. array(
  39. 'src' => '//s.w.org/images/core/4.3/menu-customizer.png',
  40. 'heading' => __( 'Menus in the Customizer' ),
  41. 'description' => __( 'Create your menu, update it, and assign it, all while live-previewing in the customizer. The streamlined customizer design provides a mobile-friendly and accessible interface. With every release, it becomes easier and faster to make your site just the way you want it.' ),
  42. ),
  43. array(
  44. 'src' => '//s.w.org/images/core/4.3/better-passwords.png',
  45. 'heading' => __( 'Better Passwords' ),
  46. 'description' => __( 'Keep your site more secure with WordPress&#8217; improved approach to passwords. Instead of receiving passwords via email, you&#8217;ll get a password reset link. When you add new users to your site or edit a user profile, WordPress will automatically generate a secure password.' ),
  47. ),
  48. array(
  49. 'src' => '//s.w.org/images/core/4.3/site-icon-customizer.png',
  50. 'heading' => __( 'Site Icons' ),
  51. 'description' => __( 'Site icons represent your site in browser tabs, bookmark menus, and on the home screen of mobile devices. Add your unique site icon in the customizer; it will even stay in place when you switch themes. Make your whole site reflect your brand.' ),
  52. ),
  53. );
  54. shuffle( $major_features );
  55. $minor_features = array(
  56. array(
  57. 'src' => 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBmaWxsPSIjMDBhMGQyIiBkPSJNNTAgMjE1aDI0MHYzMEg1MHpNNTAgMjc1aDI0MHYzMEg1MHpNNTAgMTU1aDI0MHYzMEg1MHpNNTAgOTVoMjQwdjMwSDUwek0zMTAuMSA5NWwxOS45IDMwIDIwLjEtMzAiLz48L3N2Zz4=',
  58. 'heading' => __( 'A smoother admin experience' ),
  59. 'description' => __( 'Refinements to the list view across the admin make your WordPress more accessible and easier to work with on any device.' ),
  60. ),
  61. array(
  62. 'src' => 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbD0iIzAwYTBkMiIgZD0iTTUgMmgxMHEuODIgMCAxLjQxLjU5VDE3IDR2OHEwIC44Mi0uNTkgMS40MVQxNSAxNGgtMmwtNSA1di01SDVxLS44MiAwLTEuNDEtLjU5VDMgMTJWNHEwLS44Mi41OS0xLjQxVDUgMnptOC41IDguNUwxMSA4bDIuNS0yLjUtMS0xTDEwIDcgNy41IDQuNWwtMSAxTDkgOGwtMi41IDIuNSAxIDFMMTAgOWwyLjUgMi41eiIvPjwvc3ZnPg==',
  63. 'heading' => __( 'Comments turned off on pages' ),
  64. 'description' => __( 'All new pages that you create will have comments turned off. Keep discussions to your blog, right where they&#8217;re supposed to happen.' ),
  65. ),
  66. array(
  67. 'src' => 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZmlsbD0iIzAwYTBkMiIgZD0iTTI5LjMyOCA1LjcxMnEuMDQ4LS4xNDQuMDk2LS4zODR0LS4wNjQtLjgxNi0uNTI4LS45NzZxLS4zODQtLjM2OC0uODcyLS40NjR0LS43OTIgMGwtLjI4OC4wOHEtMS40NTYuNzItNS44OCAzLjczNnQtNi4zOTIgNS4xNzZxLS43MzYuODMyLTEuNDA4IDIuMzJ0LS44OCAzIC41NDQgMi4zOTJxLjgzMi43MzYgMi4zNDQuNTc2dDMuMDcyLS44MjQgMi4yNDgtMS4zNTJxMi4xNDQtMi4xNDQgNS4xNjgtNi42NTZ0My42MzItNS44MDh6TTIuMjQgMjguMjRxMS4wNTYtLjY4OCAxLjcxMi0xLjUyOHQuOTUyLTEuNjE2LjU0NC0xLjUyLjcyLTEuNDggMS4yNC0xLjI4cTEuMDg4LS44IDIuNTA0LS43MDR0Mi40MjQgMS4xNjhxLjgxNi44OC44MjQgMi42NHQtMS4wOCAyLjg5NnEtMS4yMTYgMS4xMi0yLjkwNCAxLjYyNHQtMy40MjQuNDI0LTMuNTEyLS42MjR6Ii8+PC9zdmc+',
  68. 'heading' => __( 'Customize your site quickly' ),
  69. 'description' => __( 'Wherever you are on the front-end, you can click the customize link in the toolbar to swiftly make changes to your site.' ),
  70. ),
  71. );
  72. $tech_features = array(
  73. array(
  74. 'heading' => __( 'Taxonomy Roadmap' ),
  75. 'description' => __( 'Terms shared across multiple taxonomies are now split into separate terms.' ),
  76. ),
  77. array(
  78. 'heading' => __( 'Template Hierarchy' ),
  79. /* Translators: 1: singular.php; 2: single.php; 3:page.php */
  80. 'description' => sprintf( __( 'Added %1$s as a fallback for %2$s and %3$s' ), '<code>singular.php</code>', '<code>single.php</code>', '<code>page.php</code>.' ),
  81. ),
  82. array(
  83. 'heading' => '<code>WP_List_Table</code>',
  84. 'description' => __( 'List tables can and should designate a primary column.' ),
  85. ),
  86. );
  87. ?>
  88. <div class="wrap about-wrap">
  89. <h1><?php printf( __( 'Welcome to WordPress&nbsp;%s' ), $display_version ); ?></h1>
  90. <div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s makes it even easier to format your content and customize your site.' ), $display_version ); ?></div>
  91. <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
  92. <h2 class="nav-tab-wrapper">
  93. <a href="about.php" class="nav-tab nav-tab-active"><?php _e( 'What&#8217;s New' ); ?></a>
  94. <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
  95. <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
  96. </h2>
  97. <div class="headline-feature feature-video">
  98. <iframe width="1050" height="591" src="<?php echo esc_url( $video_url ); ?>" frameborder="0" allowfullscreen></iframe>
  99. <script src="https://videopress.com/videopress-iframe.js"></script>
  100. </div>
  101. <hr/>
  102. <div class="feature-section two-col">
  103. <?php foreach ( $major_features as $feature ) : ?>
  104. <div class="col">
  105. <div class="media-container">
  106. <?php
  107. // Video.
  108. if ( is_array( $feature['src'] ) ) :
  109. echo wp_video_shortcode( array(
  110. 'mp4' => $feature['src']['mp4'],
  111. 'ogv' => $feature['src']['ogv'],
  112. 'webm' => $feature['src']['webm'],
  113. 'loop' => true,
  114. 'autoplay' => true,
  115. 'width' => 500,
  116. 'height' => 284
  117. ) );
  118. // Image.
  119. else:
  120. ?>
  121. <img src="<?php echo esc_url( $feature['src'] ); ?>" />
  122. <?php endif; ?>
  123. </div>
  124. <h3><?php echo $feature['heading']; ?></h3>
  125. <p><?php echo $feature['description']; ?></p>
  126. </div>
  127. <?php endforeach; ?>
  128. </div>
  129. <div class="feature-section three-col">
  130. <?php foreach ( $minor_features as $feature ) : ?>
  131. <div class="col">
  132. <div class="svg-container">
  133. <img src="<?php echo esc_attr( $feature['src'] ); ?>" />
  134. </div>
  135. <h3><?php echo $feature['heading']; ?></h3>
  136. <p><?php echo $feature['description']; ?></p>
  137. </div>
  138. <?php endforeach; ?>
  139. </div>
  140. <div class="changelog">
  141. <h3><?php _e( 'Under the Hood' ); ?></h3>
  142. <div class="feature-section under-the-hood three-col">
  143. <?php foreach ( $tech_features as $feature ) : ?>
  144. <div class="col">
  145. <h4><?php echo $feature['heading']; ?></h4>
  146. <p><?php echo $feature['description']; ?></p>
  147. </div>
  148. <?php endforeach; ?>
  149. </div>
  150. <div class="return-to-dashboard">
  151. <?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
  152. <a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>">
  153. <?php is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard &rarr; Updates' ); ?>
  154. </a> |
  155. <?php endif; ?>
  156. <a href="<?php echo esc_url( self_admin_url() ); ?>"><?php is_blog_admin() ? _e( 'Go to Dashboard &rarr; Home' ) : _e( 'Go to Dashboard' ); ?></a>
  157. </div>
  158. </div>
  159. </div>
  160. <?php
  161. include( ABSPATH . 'wp-admin/admin-footer.php' );
  162. // These are strings we may use to describe maintenance/security releases, where we aim for no new strings.
  163. return;
  164. _n_noop( 'Maintenance Release', 'Maintenance Releases' );
  165. _n_noop( 'Security Release', 'Security Releases' );
  166. _n_noop( 'Maintenance and Security Release', 'Maintenance and Security Releases' );
  167. /* translators: 1: WordPress version number. */
  168. _n_noop( '<strong>Version %1$s</strong> addressed a security issue.',
  169. '<strong>Version %1$s</strong> addressed some security issues.' );
  170. /* translators: 1: WordPress version number, 2: plural number of bugs. */
  171. _n_noop( '<strong>Version %1$s</strong> addressed %2$s bug.',
  172. '<strong>Version %1$s</strong> addressed %2$s bugs.' );
  173. /* translators: 1: WordPress version number, 2: plural number of bugs. Singular security issue. */
  174. _n_noop( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
  175. '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.' );
  176. /* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
  177. _n_noop( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
  178. '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.' );
  179. __( 'For more information, see <a href="%s">the release notes</a>.' );