Changeset 6284
- Timestamp:
- 12/18/2017 05:42:35 PM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
- Files:
-
- 1 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/404.php
r5352 r6284 20 20 21 21 <div class="page-content"> 22 <p><?php printf( __( 'Try searching from the field above, or go to the <a href="%s">home page</a>.', 'wporg-plugins' ), get_home_url() ); ?></p> 22 <p> 23 <?php 24 /* translators: URL to home page. */ 25 printf( wp_kses_post( __( 'Try searching from the field above, or go to the <a href="%s">home page</a>.', 'wporg-plugins' ) ), esc_url( get_home_url() ) ); 26 ?> 27 </p> 23 28 24 29 <div class="logo-swing"> 25 <img src="<?php echo get_theme_file_uri( '/images/wp-logo-blue-trans-blur.png'); ?>" class="wp-logo" />26 <img src="<?php echo get_theme_file_uri( '/images/wp-logo-blue.png'); ?>" class="wp-logo" />30 <img src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue-trans-blur.png' ) ); ?>" class="wp-logo" /> 31 <img src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue.png' ) ); ?>" class="wp-logo" /> 27 32 </div> 28 33 </div><!-- .page-content --> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/archive.php
r4223 r6284 15 15 <main id="main" class="site-main" role="main"> 16 16 17 <?php 18 if ( have_posts() ) : ?> 17 <?php if ( have_posts() ) : ?> 19 18 20 19 <header class="page-header"> 21 20 <?php 22 23 21 the_archive_title( '<h1 class="page-title">', '</h1>' ); 22 the_archive_description( '<div class="taxonomy-description">', '</div>' ); 24 23 ?> 25 24 </header><!-- .page-header --> … … 45 44 get_template_part( 'template-parts/content', 'none' ); 46 45 47 endif; ?> 46 endif; 47 ?> 48 48 49 49 </main><!-- #main --> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/footer.php
r3193 r6284 11 11 12 12 namespace WordPressdotorg\Plugin_Directory\Theme; 13 13 14 ?> 14 15 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php
r5114 r6284 11 11 12 12 $sections = array( 13 'featured' => __( 'Featured Plugins', 'wporg-plugins' ),14 'popular' => __( 'Popular Plugins', 'wporg-plugins' ),15 'beta' => __( 'Beta Plugins', 'wporg-plugins' ),16 'favorites' => __( 'My Favorites', 'wporg-plugins' ), 13 'featured' => __( 'Featured Plugins', 'wporg-plugins' ), 14 'popular' => __( 'Popular Plugins', 'wporg-plugins' ), 15 'beta' => __( 'Beta Plugins', 'wporg-plugins' ), 16 'favorites' => __( 'My Favorites', 'wporg-plugins' ), 17 17 ); 18 18 … … 27 27 <main id="main" class="site-main" role="main"> 28 28 29 <?php foreach ( $sections as $browse => $section_title ) : 29 <?php 30 foreach ( $sections as $browse => $section_title ) : 30 31 // Only logged in users can have favorites. 31 32 if ( 'favorites' === $browse && ! is_user_logged_in() ) { … … 56 57 <header class="section-header"> 57 58 <h2 class="section-title"><?php echo esc_html( $section_title ); ?></h2> 58 <a class="section-link" href="<?php echo esc_url( home_url( "browse/$browse/" ) ); ?>"><?php 59 /* translators: %s: Section title as an accessibility text for screen readers. */ 60 printf( _x( 'See all %s', 'plugins', 'wporg-plugins' ), "<span class=\"screen-reader-text\">{$section_title}</span>" ); 61 ?></a> 59 <a class="section-link" href="<?php echo esc_url( home_url( "browse/$browse/" ) ); ?>"> 60 <?php 61 printf( 62 /* translators: %s: Section title as an accessibility text for screen readers. */ 63 esc_html_x( 'See all %s', 'plugins', 'wporg-plugins' ), 64 '<span class="screen-reader-text">' . esc_html( $section_title ) . '</span>' 65 ); 66 ?> 67 </a> 62 68 </header> 63 69 … … 79 85 the_widget( 'WP_Widget_Text', array( 80 86 'title' => __( 'Add Your Plugin', 'wporg-plugins' ), 81 'text' => sprintf( __( 'The WordPress Plugin Directory is the largest directory of free and open source WordPress plugins. Find out how to <a href="%s">host your plugin</a> on WordPress.org.', 'wporg-plugins' ), esc_url( home_url( 'developers' ) ) ), 87 'text' => sprintf( 88 /* translators: URL to Developers page. */ 89 __( 'The WordPress Plugin Directory is the largest directory of free and open source WordPress plugins. Find out how to <a href="%s">host your plugin</a> on WordPress.org.', 'wporg-plugins' ), 90 esc_url( home_url( 'developers' ) ) 91 ), 82 92 ), $widget_args ); 83 93 84 94 the_widget( 'WP_Widget_Text', array( 85 95 'title' => __( 'Create a Plugin', 'wporg-plugins' ), 86 'text' => sprintf( __( 'Building a plugin has never been easier. Read through the <a href="%s">Plugin Developer Handbook</a> to learn all about WordPress plugin development.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/' ) ), 96 'text' => sprintf( 97 /* translators: URL to Developer Handbook. */ 98 __( 'Building a plugin has never been easier. Read through the <a href="%s">Plugin Developer Handbook</a> to learn all about WordPress plugin development.', 'wporg-plugins' ), 99 esc_url( 'https://developer.wordpress.org/plugins/' ) 100 ), 87 101 ), $widget_args ); 88 102 89 103 the_widget( 'WP_Widget_Text', array( 90 104 'title' => __( 'Stay Up-to-Date', 'wporg-plugins' ), 91 'text' => sprintf( __( 'Plugin development is constantly changing with each new WordPress release. Keep up with the latest changes by following the <a href="%s">Plugin Review Team’s blog</a>.', 'wporg-plugins' ), esc_url( 'https://make.wordpress.org/plugins/' ) ), 105 'text' => sprintf( 106 /* translators: URL to make/plugins site. */ 107 __( 'Plugin development is constantly changing with each new WordPress release. Keep up with the latest changes by following the <a href="%s">Plugin Review Team’s blog</a>.', 'wporg-plugins' ), 108 esc_url( 'https://make.wordpress.org/plugins/' ) 109 ), 92 110 ), $widget_args ); 93 111 ?> 94 112 </aside><!-- #secondary --> 95 <?php 113 114 <?php 96 115 get_footer(); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r6249 r6284 9 9 10 10 namespace WordPressdotorg\Plugin_Directory\Theme; 11 11 12 use WordPressdotorg\Plugin_Directory\Plugin_Directory; 12 13 use WordPressdotorg\Plugin_Directory\Template; … … 24 25 add_theme_support( 'automatic-feed-links' ); 25 26 26 // Don't include Adjacent Posts functionality 27 // Don't include Adjacent Posts functionality. 27 28 remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' ); 28 29 … … 60 61 function scripts() { 61 62 $suffix = is_rtl() ? '-rtl' : ''; 62 wp_enqueue_style( 'wporg-plugins-style', get_template_directory_uri() . "/css/style{$suffix}.css", [ 'open-sans'], '20171206a' );63 wp_enqueue_style( 'wporg-plugins-style', get_template_directory_uri() . "/css/style{$suffix}.css", [ 'open-sans', 'dashicons' ], '20171206a' ); 63 64 64 65 wp_enqueue_script( 'wporg-plugins-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); … … 98 99 } 99 100 100 // React is currently only used on detail pages 101 // React is currently only used on detail pages. 101 102 if ( is_single() ) { 102 103 wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), '20170501', true ); … … 111 112 'Plural-Forms' => _x( 'nplurals=2; plural=n != 1;', 'plural forms', 'wporg-plugins' ), 112 113 'Language' => _x( 'en', 'language (fr, fr_CA)', 'wporg-plugins' ), 113 'localeSlug' => _x( 'en', 'locale slug', 'wporg-plugins' ) 114 'localeSlug' => _x( 'en', 'locale slug', 'wporg-plugins' ), 114 115 ), 115 116 ) ); … … 148 149 149 150 // Remove version argument. 150 if ( in_array( $handle, [ 'open-sans'], true ) ) {151 if ( in_array( $handle, [ 'open-sans' ], true ) ) { 151 152 $src = remove_query_arg( 'ver', $src ); 152 153 } … … 154 155 return $src; 155 156 } 156 add_filter( 'style_loader_src', 157 add_filter( 'style_loader_src', __NAMESPACE__ . '\loader_src', 10, 2 ); 157 158 add_filter( 'script_loader_src', __NAMESPACE__ . '\loader_src', 10, 2 ); 158 159 … … 171 172 */ 172 173 function customize_register( $wp_customize ) { 173 $wp_customize->get_setting( 'blogname' )->transport 174 $wp_customize->get_setting( 'blogdescription' )->transport 174 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 175 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 175 176 } 176 177 add_action( 'customize_register', __NAMESPACE__ . '\customize_register' ); … … 182 183 wp_enqueue_script( 'wporg_plugins_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); 183 184 } 184 add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_js' ); 185 186 185 add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_js' ); 186 187 /** 188 * Filters the list of CSS body classes for the current post or page. 189 * 190 * @param array $classes An array of body classes. 191 * @return array 192 */ 187 193 function custom_body_class( $classes ) { 188 194 $classes[] = 'no-js'; … … 206 212 function document_title( $title ) { 207 213 if ( is_front_page() ) { 208 $title['title'] = __( 'WordPress Plugins', 'wporg-plugins' );214 $title['title'] = __( 'WordPress Plugins', 'wporg-plugins' ); 209 215 $title['tagline'] = __( 'Plugins extend and expand the functionality of WordPress.', 'wporg-plugins' ); 210 216 } else { … … 260 266 } 261 267 262 $banner = Template::get_plugin_banner(); 268 $icon = Template::get_plugin_icon(); 269 $banner = Template::get_plugin_banner(); 270 263 271 $banner['banner_2x'] = $banner['banner_2x'] ? $banner['banner'] : false; 264 $icon = Template::get_plugin_icon();265 272 266 273 printf( '<meta property="og:title" content="%s" />' . "\n", the_title_attribute( array( 'echo' => false ) ) ); … … 295 302 add_action( 'wp_head', function() { 296 303 add_filter( 'post_type_archive_title', __NAMESPACE__ . '\strong_archive_title' ); 297 add_filter( 'single_term_title', 298 add_filter( 'single_cat_title', 299 add_filter( 'single_tag_title', 300 add_filter( 'get_the_date', 304 add_filter( 'single_term_title', __NAMESPACE__ . '\strong_archive_title' ); 305 add_filter( 'single_cat_title', __NAMESPACE__ . '\strong_archive_title' ); 306 add_filter( 'single_tag_title', __NAMESPACE__ . '\strong_archive_title' ); 307 add_filter( 'get_the_date', __NAMESPACE__ . '\strong_archive_title' ); 301 308 } ); 302 309 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php
r5174 r6284 28 28 <div class="site-branding"> 29 29 <?php if ( is_home() ) : ?> 30 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php _ex( 'Plugins','Site title', 'wporg-plugins' ); ?></a></h1>30 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html_x( 'Plugins', 'Site title', 'wporg-plugins' ); ?></a></h1> 31 31 32 32 <p class="site-description"> … … 35 35 printf( 36 36 /* Translators: Total number of plugins. */ 37 _n( 'Extend your WordPress experience with %s plugin.', 'Extend your WordPress experience with %s plugins.', $plugin_count, 'wporg-plugins'),38 number_format_i18n( $plugin_count)37 esc_html( _n( 'Extend your WordPress experience with %s plugin.', 'Extend your WordPress experience with %s plugins.', $plugin_count, 'wporg-plugins' ) ), 38 esc_html( number_format_i18n( $plugin_count ) ) 39 39 ); 40 40 ?> … … 42 42 <?php get_search_form(); ?> 43 43 <?php else : ?> 44 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php _ex( 'Plugins','Site title', 'wporg-plugins' ); ?></a></p>44 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html_x( 'Plugins', 'Site title', 'wporg-plugins' ); ?></a></p> 45 45 46 46 <nav id="site-navigation" class="main-navigation" role="navigation"> … … 50 50 <?php 51 51 foreach ( $menu_items as $path => $text ) : 52 $class = false !== strpos( $_SERVER['REQUEST_URI'], $path ) ? ' class="active" ' : '';52 $class = false !== strpos( $_SERVER['REQUEST_URI'], $path ) ? 'active' : ''; // phpcs:ignore 53 53 ?> 54 <li class="page_item"><a <?php echo $class; ?>href="<?php echo esc_url( home_url( $path ) ); ?>"><?php echo esc_html( $text ); ?></a></li>54 <li class="page_item"><a class="<?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( home_url( $path ) ); ?>"><?php echo esc_html( $text ); ?></a></li> 55 55 <?php endforeach; ?> 56 56 <li><?php get_search_form(); ?></li> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/inc/template-tags.php
r6251 r6284 9 9 10 10 namespace WordPressdotorg\Plugin_Directory\Theme; 11 11 12 use WordPressdotorg\Plugin_Directory\Template; 12 13 use WordPressdotorg\Plugin_Directory\Tools; 13 14 14 // Returns an absolute url to the current url, no matter what that actually is. 15 function wporg_plugins_self_link() { 16 $site_path = preg_replace( '!^' . preg_quote( parse_url( home_url(), PHP_URL_PATH ), '!' ) . '!', '', $_SERVER['REQUEST_URI'] ); 17 return home_url( $site_path ); 18 } 19 20 function wporg_plugins_template_last_updated() { 21 return '<span title="' . get_the_time('Y-m-d') . '">' . sprintf( _x( '%s ago', 'wporg-plugins' ), human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) ) . '</span>'; 22 } 23 24 function wporg_plugins_template_compatible_up_to() { 25 $tested = get_post_meta( get_the_id(), 'tested', true ) ; 26 if ( ! $tested ) { 27 $tested = _x( 'unknown', 'unknown version', 'wporg-plugins' ); 28 } 29 return esc_html( $tested ); 30 } 31 32 function wporg_plugins_template_requires() { 33 return esc_html( get_post_meta( get_the_id(), 'requires', true ) ); 34 } 35 36 function wporg_plugins_the_version() { 37 return esc_html( get_post_meta( get_the_id(), 'version', true ) ); 38 } 39 40 function wporg_plugins_download_link() { 41 return esc_url( Template::download_link( get_the_id() ) ); 42 } 43 15 /** 16 * Returns a list of authors. 17 * 18 * @return string 19 */ 44 20 function wporg_plugins_template_authors() { 45 21 $contributors = get_post_meta( get_the_id(), 'contributors', true ); … … 58 34 59 35 $author_links = array(); 60 $and_more = false;36 $and_more = false; 61 37 foreach ( $authors as $user ) { 62 38 $author_links[] = sprintf( '<a href="%s">%s</a>', 'https://profiles.wordpress.org/' . $user->user_nicename . '/', $user->display_name ); … … 68 44 69 45 if ( $and_more ) { 70 return sprintf( '<cite> By: %s, and others.</cite>', implode( ', ', $author_links ) );46 return sprintf( '<cite> By: %s, and others.</cite>', implode( ', ', $author_links ) ); 71 47 } else { 72 return sprintf( '<cite> By: %s</cite>', implode(', ', $author_links ) ); 73 } 74 } 75 48 return sprintf( '<cite> By: %s</cite>', implode( ', ', $author_links ) ); 49 } 50 } 76 51 77 52 /** … … 81 56 */ 82 57 function the_plugin_banner( $post = null ) { 83 echo Template::get_plugin_banner( $post, 'html' ); 58 echo Template::get_plugin_banner( $post, 'html' ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped 84 59 } 85 60 … … 95 70 96 71 $is_favorited = Tools::favorited_plugin( get_post( $post ) ); 97 ?>98 <div class="plugin-favorite">99 <a href="<?php echo esc_url( Template::get_favorite_link() ); ?>" class="plugin-favorite-heart<?php echo $is_favorited ? ' favorited' : ''; ?>">72 ?> 73 <div class="plugin-favorite"> 74 <a href="<?php echo esc_url( Template::get_favorite_link() ); ?>" class="plugin-favorite-heart<?php echo $is_favorited ? ' favorited' : ''; ?>"> 100 75 <span class="screen-reader-text"> 101 76 <?php 102 77 if ( $is_favorited ) { 103 78 /* translators: %s: plugin name */ 104 printf( __( 'Unfavorite %s', 'wporg-plugins' ), get_the_title() );79 printf( esc_html__( 'Unfavorite %s', 'wporg-plugins' ), get_the_title() ); 105 80 } else { 106 81 /* translators: %s: plugin name */ 107 printf( __( 'Favorite %s', 'wporg-plugins' ), get_the_title() );82 printf( esc_html__( 'Favorite %s', 'wporg-plugins' ), get_the_title() ); 108 83 } 109 84 ?> 110 85 </span> 111 </a>112 <script>113 jQuery( '.plugin-favorite-heart' )114 .on( 'click touchstart animationend', function() {115 jQuery( this ).toggleClass( 'is-animating' );116 } )117 .on( 'click', function() {118 jQuery( this ).toggleClass( 'favorited' );119 } );120 </script>121 </div>122 <?php86 </a> 87 <script> 88 jQuery( '.plugin-favorite-heart' ) 89 .on( 'click touchstart animationend', function () { 90 jQuery( this ).toggleClass( 'is-animating' ); 91 } ) 92 .on( 'click', function () { 93 jQuery( this ).toggleClass( 'favorited' ); 94 } ); 95 </script> 96 </div> 97 <?php 123 98 } 124 99 … … 133 108 $url = get_post_meta( $post->ID, 'header_author_uri', true ); 134 109 $author = strip_tags( get_post_meta( $post->ID, 'header_author', true ) ) ?: get_the_author(); 135 $author = esc_html( Template::encode( $author ) );136 110 $author = $url ? '<a class="url fn n" rel="nofollow" href="' . esc_url( $url ) . '">' . $author . '</a>' : $author; 137 111 138 printf( _x( 'By %s', 'post author', 'wporg-plugins' ), '<span class="author vcard">' . $author . '</span>' ); 112 /* translators: post author. */ 113 printf( esc_html_x( 'By %s', 'post author', 'wporg-plugins' ), '<span class="author vcard">' . wp_kses_post( $author ) . '</span>' ); 139 114 } 140 115 … … 145 120 */ 146 121 function the_active_plugin_notice( $post = null ) { 147 if ( ! in_array( get_post_status( $post ), [ 'rejected', 'closed'], true ) ) {148 echo get_plugin_status_notice( $post);122 if ( ! in_array( get_post_status( $post ), [ 'rejected', 'closed' ], true ) ) { 123 echo wp_kses_post( get_plugin_status_notice( $post ) ); 149 124 }; 150 125 } … … 156 131 */ 157 132 function the_closed_plugin_notice( $post = null ) { 158 echo get_closed_plugin_notice( $post);133 echo wp_kses_post( get_closed_plugin_notice( $post ) ); 159 134 } 160 135 … … 169 144 $notice = ''; 170 145 171 if ( in_array( get_post_status( $post ), [ 'rejected', 'closed'], true ) ) {146 if ( in_array( get_post_status( $post ), [ 'rejected', 'closed' ], true ) ) { 172 147 $notice = get_plugin_status_notice( $post ); 173 148 174 if ( get_current_user_id() == $post->post_author ) {149 if ( get_current_user_id() === (int) $post->post_author ) { 175 150 $info_notice = '<div class="plugin-notice notice notice-info notice-alt"><p>%s</p></div><!-- .plugin-notice -->'; 176 151 $message = sprintf( 177 /* translators: 1: plugins@wordpress.org */152 /* translators: 1: plugins@wordpress.org */ 178 153 __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporgplugins' ), 179 154 'plugins@wordpress.org' … … 244 219 $closed_date = get_post_meta( get_the_ID(), 'plugin_closed_date', true ); 245 220 if ( ! empty( $closed_date ) ) { 221 /* translators: Closing date. */ 246 222 $message = sprintf( __( 'This plugin was closed on %s and is no longer available for download.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) ); 247 223 } else { -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/index.php
r3193 r6284 15 15 namespace WordPressdotorg\Plugin_Directory\Theme; 16 16 17 get_header(); ?> 17 get_header(); 18 ?> 18 19 19 20 <main id="main" class="site-main" role="main"> 20 21 21 22 <?php 22 23 24 ?>23 if ( have_posts() ) : 24 if ( is_home() && ! is_front_page() ) : 25 ?> 25 26 <header> 26 27 <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1> 27 28 </header> 29 <?php 30 endif; 28 31 29 <?php 30 endif; 32 /* Start the Loop */ 33 while ( have_posts() ) : 34 the_post(); 31 35 32 /* Start the Loop */ 33 while ( have_posts() ) : 34 the_post(); 36 get_template_part( 'template-parts/plugin', 'index' ); 37 endwhile; 35 38 36 get_template_part( 'template-parts/plugin', 'index' ); 37 endwhile; 38 39 the_posts_pagination(); 39 the_posts_pagination(); 40 40 41 41 else : -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/package.json
r5117 r6284 41 41 "lodash": "^4.13.1", 42 42 "pixrem": "^3.0.2", 43 "postcss": "^6.0.14", 43 44 "react": "^15.2.1", 44 45 "react-dom": "^15.2.1", … … 50 51 "redux-router": "^2.1.2", 51 52 "redux-thunk": "^2.1.0", 53 "rtlcss": "^2.2.1", 52 54 "webpack": "^1.13.1", 53 55 "webpack-dev-server": "^1.14.1" -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-add.php
r4210 r6284 12 12 <main id="main" class="site-main" role="main"> 13 13 14 <?php while ( have_posts() ) : the_post(); ?> 14 <?php 15 while ( have_posts() ) : 16 the_post(); 17 ?> 15 18 16 19 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 17 20 <header class="entry-header"> 18 <h1 class="entry-title"><?php _e( 'Add Your Plugin', 'wporg-plugins' ); ?></h1>21 <h1 class="entry-title"><?php esc_html_e( 'Add Your Plugin', 'wporg-plugins' ); ?></h1> 19 22 </header><!-- .entry-header --> 20 23 … … 22 25 <section> 23 26 <div class="container"> 24 <p><?php printf( __( 'Once submitted, your plugin will be manually reviewed for any common errors as well as ensuring it complies with <a href="%s">all the guidelines</a>.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) ); ?></p> 27 <p> 28 <?php 29 printf( 30 /* translators: URL to plugin guidelines. */ 31 wp_kses_post( __( 'Once submitted, your plugin will be manually reviewed for any common errors as well as ensuring it complies with <a href="%s">all the guidelines</a>.', 'wporg-plugins' ) ), 32 esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) 33 ); 34 ?> 35 </p> 25 36 26 37 <?php echo do_shortcode( '[wporg-plugin-upload]' ); ?> 27 38 28 <p><?php _e( 'Even if you’ve submitted a dozen plugins, take the time to refresh your memory with the following information:', 'wporg-plugins' ); ?>39 <p><?php esc_html_e( 'Even if you’ve submitted a dozen plugins, take the time to refresh your memory with the following information:', 'wporg-plugins' ); ?> 29 40 <ul> 30 <li><a href="https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/"><?php _e( 'How to use SVN', 'wporg-plugins' ); ?></a></li>31 <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/"><?php _e( 'Plugin Assets (and how to use them)', 'wporg-plugins' ); ?></a></li>32 <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/"><?php _e( 'Developer FAQ', 'wporg-plugins' ); ?></a></li>41 <li><a href="https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/"><?php esc_html_e( 'How to use SVN', 'wporg-plugins' ); ?></a></li> 42 <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/"><?php esc_html_e( 'Plugin Assets (and how to use them)', 'wporg-plugins' ); ?></a></li> 43 <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/"><?php esc_html_e( 'Developer FAQ', 'wporg-plugins' ); ?></a></li> 33 44 </ul> 34 45 </div> … … 37 48 <section> 38 49 <div class="container"> 39 <h2 id="faq"><?php _e( 'FAQ', 'wporg-plugins' ); ?></h2>50 <h2 id="faq"><?php esc_html_e( 'FAQ', 'wporg-plugins' ); ?></h2> 40 51 41 <h3><?php _e( 'How long will the review process take?', 'wporg-plugins' ); ?></h3> 42 <p><?php printf( __( 'This is in the <a href="%s">Developer FAQ</a>. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) ); ?></p> 52 <h3><?php esc_html_e( 'How long will the review process take?', 'wporg-plugins' ); ?></h3> 53 <p> 54 <?php 55 printf( 56 /* translators: URL to plugin developer FAQ. */ 57 wp_kses_post( __( 'This is in the <a href="%s">Developer FAQ</a>. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.', 'wporg-plugins' ) ), 58 esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) 59 ); 60 ?> 61 </p> 43 62 44 <h3><?php _e( 'What will my plugin URL be?', 'wporg-plugins' ); ?></h3>45 <p><?php _e( 'Your plugin’s URL will be populated based on the value of <code>Plugin Name</code> in your main plugin file (the one with the plugin headers). If you set yours as <code>Plugin Name: Boaty McBoatface</code> then your URL will be <code>https://wordpress.org/plugins/boaty-mcboatface</code> and your slug will be <code>boaty-mcboatface</code> for example. If there is an existing plugin with your name, then you will be <code>boaty-mcboatface-2</code> and so on. It behaves exactly like WordPress post names.', 'wporg-plugins'); ?></p>46 <p><?php _e( 'Once your plugin is approved, it <em>cannot</em> be renamed.', 'wporg-plugins'); ?></p>63 <h3><?php esc_html_e( 'What will my plugin URL be?', 'wporg-plugins' ); ?></h3> 64 <p><?php echo wp_kses_post( __( 'Your plugin’s URL will be populated based on the value of <code>Plugin Name</code> in your main plugin file (the one with the plugin headers). If you set yours as <code>Plugin Name: Boaty McBoatface</code> then your URL will be <code>https://wordpress.org/plugins/boaty-mcboatface</code> and your slug will be <code>boaty-mcboatface</code> for example. If there is an existing plugin with your name, then you will be <code>boaty-mcboatface-2</code> and so on. It behaves exactly like WordPress post names.', 'wporg-plugins' ) ); ?></p> 65 <p><?php echo wp_kses_post( __( 'Once your plugin is approved, it <em>cannot</em> be renamed.', 'wporg-plugins' ) ); ?></p> 47 66 48 <h3><?php _e( 'I made a mistake in my plugin name. Should I resubmit?', 'wporg-plugins' ); ?></h3>49 <p><?php _e( 'Please don’t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it’s not approved. Since we check emails first, the odds are we’ll catch it. If we don’t, just email us and explain the mistake. We’ll explain what do to.', 'wporg-plugins'); ?></p>67 <h3><?php esc_html_e( 'I made a mistake in my plugin name. Should I resubmit?', 'wporg-plugins' ); ?></h3> 68 <p><?php echo wp_kses_post( __( 'Please don’t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it’s not approved. Since we check emails first, the odds are we’ll catch it. If we don’t, just email us and explain the mistake. We’ll explain what do to.', 'wporg-plugins' ) ); ?></p> 50 69 51 <h3><?php _e( 'Why was I told my plugin name was unacceptable?', 'wporg-plugins' ); ?></h3> 52 <p><?php printf( __( 'This is explained in detail in our <a href="%s">detailed plugin guidelines</a>, but currently we give you the chance to rename it during the review process if the plugin name violates the guideline. Some terms (like “plugin” and “wordpress”) will be removed for you, as those should not be used at all. We get it; you’re a WordPress Plugin.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) ); ?></p> 53 <p><?php _e( 'Regarding the names and trademarks of other companies and plugins, don’t use them at the start of your plugin name. If you’re not Facebook, you shouldn’t submit a plugin that uses <code>facebook</code> as the first term in your slug. “Facebook Like Sharer” (which would be <code>facebook-like-sharer</code>) is not acceptable, but “Like Sharer for Facebook” (which would be <code>like-sharer-for-facebook</code>) would be alright.', 'wporg-plugins' ); ?></p> 70 <h3><?php esc_html_e( 'Why was I told my plugin name was unacceptable?', 'wporg-plugins' ); ?></h3> 71 <p> 72 <?php 73 printf( 74 /* translators: URL to plugin guidelines. */ 75 wp_kses_post( __( 'This is explained in detail in our <a href="%s">detailed plugin guidelines</a>, but currently we give you the chance to rename it during the review process if the plugin name violates the guideline. Some terms (like “plugin” and “WordPress”) will be removed for you, as those should not be used at all. We get it; you’re a WordPress Plugin.', 'wporg-plugins' ) ), 76 esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) 77 ); 78 ?> 79 </p> 80 <p><?php echo wp_kses_post( __( 'Regarding the names and trademarks of other companies and plugins, don’t use them at the start of your plugin name. If you’re not Facebook, you shouldn’t submit a plugin that uses <code>facebook</code> as the first term in your slug. “Facebook Like Sharer” (which would be <code>facebook-like-sharer</code>) is not acceptable, but “Like Sharer for Facebook” (which would be <code>like-sharer-for-facebook</code>) would be alright.', 'wporg-plugins' ) ); ?></p> 54 81 </div> 55 82 </section> … … 60 87 edit_post_link( 61 88 sprintf( 62 /* translators: %s: Name of current post */89 /* translators: %s: Name of current post */ 63 90 esc_html__( 'Edit %s', 'wporg-plugins' ), 64 91 the_title( '<span class="screen-reader-text">"', '"</span>', false ) … … 71 98 </article><!-- #post-## --> 72 99 73 <?php endwhile; 100 <?php endwhile; ?> 74 101 75 102 </main><!-- #main --> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-developers.php
r6231 r6284 12 12 <main id="main" class="site-main" role="main"> 13 13 14 <?php while ( have_posts() ) : the_post(); ?> 14 <?php 15 while ( have_posts() ) : 16 the_post(); 17 ?> 15 18 16 19 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 17 20 <header class="entry-header"> 18 <h1 class="entry-title"><?php _e( 'Developer Information', 'wporg-plugins' ); ?></h1>21 <h1 class="entry-title"><?php esc_html_e( 'Developer Information', 'wporg-plugins' ); ?></h1> 19 22 </header><!-- .entry-header --> 20 23 21 24 <div class="entry-content"> 25 <p> 26 <?php 27 /* translators: URL to plugin submission form. */ 28 printf( wp_kses_post( __( 'You’ve got a cool new plugin and are hoping to give it some exposure. You’re in the right place. Just <a href="%s">ask us to host it for you</a>. You’ll be able to:', 'wporg-plugins' ) ), esc_url( home_url( 'developers/add/' ) ) ); 29 ?> 30 </p> 31 <ul> 32 <li><?php esc_html_e( 'Keep track of how many people have downloaded it.', 'wporg-plugins' ); ?></li> 33 <li><?php esc_html_e( 'Let people leave comments about your plugin.', 'wporg-plugins' ); ?></li> 34 <li><?php esc_html_e( 'Get your plugin rated against all the other cool WordPress plugins.', 'wporg-plugins' ); ?></li> 35 <li><?php esc_html_e( 'Give your plugin lots of exposure in this centralized repository.', 'wporg-plugins' ); ?></li> 36 </ul> 22 37 23 <p><?php printf( __( 'You’ve got a cool new plugin and are hoping to give it some exposure. You’re in the right place. Just <a href="%s">ask us to host it for you</a>. You’ll be able to:', 'wporg-plugins' ), esc_url( home_url( 'developers/add/' ) ) ); ?></p> 24 <ul> 25 <li><?php _e( 'Keep track of how many people have downloaded it.', 'wporg-plugins' ); ?></li> 26 <li><?php _e( 'Let people leave comments about your plugin.', 'wporg-plugins' ); ?></li> 27 <li><?php _e( 'Get your plugin rated against all the other cool WordPress plugins.', 'wporg-plugins' ); ?></li> 28 <li><?php _e( 'Give your plugin lots of exposure in this centralized repository.', 'wporg-plugins' ); ?></li> 29 </ul> 38 <h3><?php esc_html_e( 'There are some restrictions', 'wporg-plugins' ); ?></h3> 39 <ul> 40 <li> 41 <?php 42 /* translators: URL to licence list. */ 43 printf( wp_kses_post( __( 'Your plugin must be compatible with the <a href="%s">GNU General Public License v2</a>, or any later version. We strongly recommend using the same license as WordPress — “GPLv2 or later.”', 'wporg-plugins' ) ), esc_url( 'https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses' ) ); 44 ?> 45 </li> 46 <li><?php esc_html_e( 'The plugin must not do anything illegal or be morally offensive (that’s subjective, we know).', 'wporg-plugins' ); ?></li> 47 <li> 48 <?php 49 /* translators: URL to Subversion. */ 50 printf( wp_kses_post( __( 'You have to actually use the <a href="%s">Subversion</a> repository we give you in order for your plugin to show up on this site. The WordPress Plugin Directory is a hosting site, not a listing site.', 'wporg-plugins' ) ), esc_url( 'https://subversion.apache.org/' ) ); 51 ?> 52 </li> 53 <li><?php esc_html_e( 'The plugin must not embed external links on the public site (like a “powered by” link) without explicitly asking the user’s permission.', 'wporg-plugins' ); ?></li> 54 <li> 55 <?php 56 /* translators: URL to plugin guidelines. */ 57 printf( wp_kses_post( __( 'Your plugin must abide by our list of <a href="%s">detailed guidelines</a>, which include not being a spammer and not abusing the systems.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) ); 58 ?> 59 </li> 60 </ul> 30 61 31 <h3><?php _e( 'There are some restrictions', 'wporg-plugins' ); ?></h3> 32 <ul> 33 <li><?php printf( __( 'Your plugin must be compatible with the <a href="%s">GNU General Public License v2</a>, or any later version. We strongly recommend using the same license as WordPress — “GPLv2 or later.”', 'wporg-plugins' ), esc_url( 'https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses' ) ); ?></li> 34 <li><?php _e( 'The plugin must not do anything illegal or be morally offensive (that’s subjective, we know).', 'wporg-plugins' ); ?></li> 35 <li><?php printf( __( 'You have to actually use the <a href="%s">Subversion</a> repository we give you in order for your plugin to show up on this site. The WordPress Plugin Directory is a hosting site, not a listing site.', 'wporg-plugins' ), esc_url( 'https://subversion.apache.org/' ) ); ?></li> 36 <li><?php _e( 'The plugin must not embed external links on the public site (like a “powered by” link) without explicitly asking the user’s permission.', 'wporg-plugins' ); ?></li> 37 <li><?php printf( __( 'Your plugin must abide by our list of <a href="%s">detailed guidelines</a>, which include not being a spammer and not abusing the systems.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) ); ?></li> 38 </ul> 62 <h3><?php esc_html_e( 'Submission is Simple', 'wporg-plugins' ); ?></h3> 63 <ol> 64 <li> 65 <?php 66 /* translators: URL to registration form. */ 67 printf( wp_kses_post( __( '<a href="%s">Sign up</a> for an account on WordPress.org.', 'wporg-plugins' ) ), esc_url( wp_registration_url() ) ); 68 ?> 69 </li> 70 <li> 71 <?php 72 /* translators: URL to plugin submission form. */ 73 printf( wp_kses_post( __( '<a href="%s">Submit your plugin for review</a>.', 'wporg-plugins' ) ), esc_url( home_url( 'developers/add/' ) ) ); 74 ?> 75 </li> 76 <li> 77 <?php 78 /* translators: URL to submission FAQ. */ 79 printf( wp_kses_post( __( 'After your plugin is <a href="%s">manually reviewed</a>, it will either be approved or you will be emailed and asked to provide more information and/or make corrections.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/#questions-about-submissions-and-approval' ) ); 80 ?> 81 </li> 82 <li> 83 <?php 84 /* translators: URL to Subversion how-to page. */ 85 printf( wp_kses_post( __( 'Once approved, you’ll be given access to a <a id="subversion" href="%s">Subversion Repository</a> where you’ll store your plugin.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/' ) ); 86 ?> 87 </li> 88 <li> 89 <?php 90 /* translators: 1: URL to readme section; 2: URL to home page; */ 91 printf( wp_kses_post( __( 'Shortly after you upload your plugin (and a <a href="%1$s">readme file</a>!) to that repository, it will be automatically displayed in the <a href="%2$s">plugins browser</a>.', 'wporg-plugins' ) ), '#readme', esc_url( home_url( '/' ) ) ); 92 ?> 93 </li> 94 <li> 95 <?php 96 /* translators: URL to developer FAQ. */ 97 printf( wp_kses_post( __( 'Check out the <strong><a href="%s">FAQ</a></strong> for more information.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) ); 98 ?> 99 </li> 100 </ol> 39 101 40 <h3><?php _e( 'Submission is Simple', 'wporg-plugins' ); ?></h3> 41 <ol> 42 <li><?php printf( __( '<a href="%s">Sign up</a> for an account on WordPress.org.', 'wporg-plugins' ), esc_url( wp_registration_url() ) ); ?></li> 43 <li><?php printf( __( '<a href="%s">Submit your plugin for review</a>.', 'wporg-plugins' ), esc_url( home_url( 'developers/add/' ) ) ); ?></li> 44 <li><?php printf( __( 'After your plugin is <a href="%s">manually reviewed</a>, it will either be approved or you will be emailed and asked to provide more information and/or make corrections.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/#questions-about-submissions-and-approval' ) ); ?></li> 45 <li><?php printf( __( 'Once approved, you’ll be given access to a <a id="subversion" href="%s">Subversion Repository</a> where you’ll store your plugin.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/' ) ); ?></li> 46 <li> 47 <?php 48 /* translators: 1: URL to readme section; 2: URL to home page; */ 49 printf( __( 'Shortly after you upload your plugin (and a <a href="%1$s">readme file</a>!) to that repository, it will be automatically displayed in the <a href="%2$s">plugins browser</a>.', 'wporg-plugins' ), '#readme', esc_url( home_url( '/' ) ) ); 50 ?> 51 </li> 52 <li><?php printf( __( 'Check out the <strong><a href="%s">FAQ</a></strong> for more information.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) ); ?></li> 53 </ol> 54 55 <h3 id="readme"><?php _e( 'Readme files', 'wporg-plugins' ); ?></h3> 56 <p> 57 <?php 58 /* translators: 1: URL to readme file; 2: URL to readme validator; */ 59 printf( __( 'To make your entry in the plugin browser most useful, each plugin should have a readme file named <code>readme.txt</code> that adheres to the <a href="%1$s">WordPress plugin readme file standard</a>. You can put your readme file through the <a href="%2$s">readme validator</a> to check it.', 'wporg-plugins' ), esc_url( home_url( 'files/2017/03/readme.txt' ) ), esc_url( home_url( '/developers/readme-validator/' ) ) ); 60 ?> 61 </p> 102 <h3 id="readme"><?php esc_html_e( 'Readme files', 'wporg-plugins' ); ?></h3> 103 <p> 104 <?php 105 /* translators: 1: URL to readme file; 2: URL to readme validator; */ 106 printf( wp_kses_post( __( 'To make your entry in the plugin browser most useful, each plugin should have a readme file named <code>readme.txt</code> that adheres to the <a href="%1$s">WordPress plugin readme file standard</a>. You can put your readme file through the <a href="%2$s">readme validator</a> to check it.', 'wporg-plugins' ) ), esc_url( home_url( 'files/2017/03/readme.txt' ) ), esc_url( home_url( '/developers/readme-validator/' ) ) ); 107 ?> 108 </p> 62 109 </div><!-- .entry-content --> 63 110 … … 66 113 edit_post_link( 67 114 sprintf( 68 /* translators: %s: Name of current post */115 /* translators: %s: Name of current post */ 69 116 esc_html__( 'Edit %s', 'wporg-plugins' ), 70 117 the_title( '<span class="screen-reader-text">"', '"</span>', false ) -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page.php
r3193 r6284 20 20 21 21 <?php 22 while ( have_posts() ) : the_post(); 22 while ( have_posts() ) : 23 the_post(); 23 24 24 25 get_template_part( 'template-parts/content', 'page' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/search.php
r4223 r6284 13 13 <main id="main" class="site-main" role="main"> 14 14 15 <?php 16 if ( have_posts() ) : ?> 15 <?php if ( have_posts() ) : ?> 17 16 18 <header class="page-header"> 19 <h1 class="page-title"><?php printf( esc_html__( 'Showing results for: %s', 'wporg-plugins' ), '<strong>' . get_search_query() . '</strong>' ); ?></h1> 20 </header><!-- .page-header --> 17 <header class="page-header"> 18 <h1 class="page-title"> 19 <?php 20 printf( 21 /* translators: Search query. */ 22 esc_html__( 'Showing results for: %s', 'wporg-plugins' ), 23 '<strong>' . get_search_query() . '</strong>' 24 ); 25 ?> 26 </h1> 27 </header><!-- .page-header --> 21 28 22 23 24 25 29 <?php 30 /* Start the Loop */ 31 while ( have_posts() ) : 32 the_post(); 26 33 27 28 34 get_template_part( 'template-parts/plugin', 'index' ); 35 endwhile; 29 36 30 37 the_posts_pagination(); 31 38 32 33 34 39 else : 40 get_template_part( 'template-parts/content', 'none' ); 41 endif; 35 42 ?> 36 43 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/searchform.php
r4223 r6284 1 1 <?php 2 /** 3 * The template for displaying search forms. 4 * 5 * @package WordPressdotorg\Plugin_Directory\Theme 6 */ 7 2 8 namespace WordPressdotorg\Plugin_Directory\Theme; 9 3 10 ?> 4 11 <form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 5 <label for="s" class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg-plugins' ); ?></label>12 <label for="s" class="screen-reader-text"><?php echo esc_html_x( 'Search for:', 'label', 'wporg-plugins' ); ?></label> 6 13 <input type="search" id="s" class="search-field" placeholder="<?php echo esc_attr_x( 'Search plugins', 'placeholder', 'wporg-plugins' ); ?>" value="<?php the_search_query(); ?>" name="s" /> 7 <button class="button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php _e( 'Search plugins', 'wporg-plugins' ); ?></span></button>14 <button class="button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php esc_html_e( 'Search plugins', 'wporg-plugins' ); ?></span></button> 8 15 </form> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/single.php
r4223 r6284 15 15 16 16 <?php 17 18 17 while ( have_posts() ) : 18 the_post(); 19 19 20 21 20 get_template_part( 'template-parts/plugin', 'single' ); 21 endwhile; // End of the loop. 22 22 ?> 23 23 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/content-none.php
r6024 r6284 16 16 17 17 <div class="page-content"> 18 <?php 19 if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> 18 <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> 20 19 21 <p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg-plugins' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p> 20 <p> 21 <?php 22 /* translators: URL to post edit screen. */ 23 printf( wp_kses_post( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg-plugins' ) ), esc_url( admin_url( 'post-new.php' ) ) ); 24 ?> 25 </p> 22 26 23 27 <?php elseif ( is_search() ) : ?> … … 29 33 30 34 elseif ( is_tax( 'plugin_section', 'favorites' ) ) : 31 32 33 ?>34 35 if ( is_user_logged_in() ) : 36 $current_user = wp_get_current_user(); 37 ?> 38 35 39 <p><?php esc_html_e( 'No favorites have been added, yet.', 'wporg-plugins' ); ?></p> 36 40 37 41 <?php if ( get_query_var( 'favorites_user' ) === $current_user->user_nicename ) : ?> 38 42 <p><?php esc_html_e( 'Find a plugin and mark it as a favorite to see it here.', 'wporg-plugins' ); ?></p> 39 <p><?php printf( __( 'Your favorite plugins are also shared on <a href="%s">your profile</a>.', 'wporg-plugins' ), esc_url( 'https://profiles.wordpress.org/' . $current_user->user_nicename ) ); ?></p> 43 <p> 44 <?php 45 /* translators: Link to user profile. */ 46 printf( wp_kses_post( __( 'Your favorite plugins are also shared on <a href="%s">your profile</a>.', 'wporg-plugins' ) ), esc_url( 'https://profiles.wordpress.org/' . $current_user->user_nicename ) ); 47 ?> 48 </p> 40 49 <?php endif; ?> 41 50 42 <?php else : ?> 43 44 <p><?php printf( __( '<a href="%s">Login to WordPress.org</a> to mark plugins as favorites.', 'wporg-plugins' ), esc_url( wp_login_url( 'https://wordpress.org/plugins/browse/favorites/' ) ) ); ?></p> 51 <?php else : ?> 52 53 <p> 54 <?php 55 /* translators: URL to login scren. */ 56 printf( wp_kses_post( __( '<a href="%s">Login to WordPress.org</a> to mark plugins as favorites.', 'wporg-plugins' ) ), esc_url( wp_login_url( 'https://wordpress.org/plugins/browse/favorites/' ) ) ); 57 ?> 58 </p> 45 59 46 60 <?php 47 endif; // is_user_logged_in() 48 49 61 endif; // is_user_logged_in. 62 else : 63 ?> 50 64 51 65 <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'wporg-plugins' ); ?></p> 52 <?php 53 get_search_form(); 66 <?php get_search_form(); ?> 54 67 55 endif; ?>68 <?php endif; ?> 56 69 </div><!-- .page-content --> 57 70 </section><!-- .no-results --> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/content-page.php
r4223 r6284 30 30 edit_post_link( 31 31 sprintf( 32 /* translators: %s: Name of current post */32 /* translators: %s: Name of current post */ 33 33 esc_html__( 'Edit %s', 'wporg-plugins' ), 34 34 the_title( '<span class="screen-reader-text">"', '"</span>', false ) -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-sidebar-advanced.php
r5867 r6284 15 15 ); 16 16 17 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta', 18 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Ratings', 19 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Support', 20 17 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta', array(), $widget_args ); 18 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Ratings', array(), $widget_args ); 19 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Support', array(), $widget_args ); 20 21 21 // If the user is not a contributor/committer for the plugin, we'll show the Donate metabox instead of the committer metabox. 22 22 if ( current_user_can( 'plugin_admin_view', $post ) ) { … … 28 28 29 29 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Contributors', array(), array( 30 'before_title' => '<h4 class="widget-title">',31 'after_title' => '</h4>',30 'before_title' => '<h4 class="widget-title">', 31 'after_title' => '</h4>', 32 32 'before_widget' => '<div id="plugin-contributors" class="widget plugin-contributors read-more" aria-expanded="false">', 33 'after_widget' => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ),33 'after_widget' => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ), 34 34 ) ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-sidebar.php
r5399 r6284 15 15 ); 16 16 17 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta', 17 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta', array(), $widget_args ); 18 18 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Ratings', array(), $widget_args ); 19 19 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Contributors', array(), array( 20 'before_title' => '<h4 class="widget-title">',21 'after_title' => '</h4>',20 'before_title' => '<h4 class="widget-title">', 21 'after_title' => '</h4>', 22 22 'before_widget' => '<div id="plugin-contributors" class="widget plugin-contributors read-more" aria-expanded="false">', 23 'after_widget' => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ),23 'after_widget' => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ), 24 24 ) ); 25 25 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Support', array(), $widget_args ); 26 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Donate', 26 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Donate', array(), $widget_args ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
r6252 r6284 9 9 10 10 namespace WordPressdotorg\Plugin_Directory\Theme; 11 11 12 use WordPressdotorg\Plugin_Directory\Plugin_Directory; 12 13 use WordPressdotorg\Plugin_Directory\Template; … … 15 16 16 17 $content = Plugin_Directory::instance()->split_post_content_into_pages( get_the_content() ); 17 $is_closed = in_array( get_post_status(), [ 'closed', 'disabled'], true );18 $is_closed = in_array( get_post_status(), [ 'closed', 'disabled' ], true ); 18 19 ?> 19 20 … … 25 26 26 27 <div class="entry-thumbnail"> 27 <?php echo Template::get_plugin_icon( $post, 'html' ); ?> 28 <?php 29 // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped 30 echo Template::get_plugin_icon( $post, 'html' ); 31 ?> 28 32 </div> 29 33 … … 32 36 33 37 <?php if ( 'publish' === get_post_status() || current_user_can( 'plugin_admin_view', $post ) ) : ?> 34 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php _e( 'Download', 'wporg-plugins' ); ?></a>38 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php esc_html_e( 'Download', 'wporg-plugins' ); ?></a> 35 39 <?php endif; ?> 36 40 </div> 37 41 38 42 <?php $plugin_title = $is_closed ? $post->post_name : get_the_title(); ?> 39 <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo $plugin_title; ?></a></h1>43 <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo wp_kses_post( $plugin_title ); ?></a></h1> 40 44 41 45 <span class="byline"><?php the_author_byline(); ?></span> … … 48 52 <span id="developers"></span> 49 53 <ul class="tabs clear"> 50 <li id="tablink-description"><a href="#description"><?php _e( 'Details', 'wporg-plugins' ); ?></a></li>51 <li id="tablink-reviews"><a href="#reviews"><?php _e( 'Reviews', 'wporg-plugins' ); ?></a></li>54 <li id="tablink-description"><a href="#description"><?php esc_html_e( 'Details', 'wporg-plugins' ); ?></a></li> 55 <li id="tablink-reviews"><a href="#reviews"><?php esc_html_e( 'Reviews', 'wporg-plugins' ); ?></a></li> 52 56 <?php if ( isset( $content['installation'] ) && ! $is_closed ) : ?> 53 57 <li id="tablink-installation"> 54 <a href="#installation"><?php _e( 'Installation', 'wporg-plugins' ); ?></a>58 <a href="#installation"><?php esc_html_e( 'Installation', 'wporg-plugins' ); ?></a> 55 59 </li> 56 60 <?php endif; ?> 57 61 <li id="tablink-support"> 58 <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php _e( 'Support', 'wporg-plugins' ); ?></a>62 <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php esc_html_e( 'Support', 'wporg-plugins' ); ?></a> 59 63 </li> 60 <li id="tablink-developers"><a href="#developers"><?php _e( 'Development', 'wporg-plugins' ); ?></a></li>64 <li id="tablink-developers"><a href="#developers"><?php esc_html_e( 'Development', 'wporg-plugins' ); ?></a></li> 61 65 </ul> 62 66 <?php endif; ?> … … 80 84 $section_content = get_closed_plugin_notice(); 81 85 82 } else if ( ! in_array( $section_slug, ['screenshots', 'installation', 'faq', 'changelog'], true ) || ! $is_closed ) {86 } elseif ( ! in_array( $section_slug, [ 'screenshots', 'installation', 'faq', 'changelog' ], true ) || ! $is_closed ) { 83 87 $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) ); 84 88 } … … 97 101 } 98 102 99 $section_read_more = ! in_array( $section_slug, $section_no_read_mores );103 $section_read_more = ! in_array( $section_slug, $section_no_read_mores, true ); 100 104 101 105 get_template_part( 'template-parts/section' ); 102 106 endforeach; 103 endif; // plugin_advanced 107 endif; // plugin_advanced. 104 108 ?> 105 109 </div><!-- .entry-content --> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin.php
r6027 r6284 9 9 10 10 namespace WordPressdotorg\Plugin_Directory\Theme; 11 11 12 use WordPressdotorg\Plugin_Directory\Template; 12 13 13 14 ?><article id="post-<?php the_ID(); ?>" <?php post_class( 'plugin-card' ); ?>> 14 $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ); 15 ?> 16 <article id="post-<?php the_ID(); ?>" <?php post_class( 'plugin-card' ); ?>> 15 17 <div class="entry-thumbnail"> 16 18 <a href="<?php the_permalink(); ?>" rel="bookmark"> 17 <?php echo Template::get_plugin_icon( get_post(), 'html' ); ?> 19 <?php 20 // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped 21 echo Template::get_plugin_icon( get_post(), 'html' ); 22 ?> 18 23 </a> 19 24 </div><div class="entry"> … … 22 27 </header><!-- .entry-header --> 23 28 24 <?php echo Template::get_star_rating(); ?>29 <?php echo wp_kses_post( Template::get_star_rating() ); ?> 25 30 26 31 <div class="entry-excerpt"> … … 34 39 </span> 35 40 <span class="active-installs"> 36 <i class="dashicons dashicons-chart-area"></i> <?php printf( __( '%s active installations', 'wporg-plugins' ), Template::active_installs(false) ); ?> 41 <i class="dashicons dashicons-chart-area"></i> 42 <?php echo esc_html( Template::active_installs() ); ?> 37 43 </span> 38 <span class="tested-with"> 39 <?php if ( $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ) ) { ?> 40 <i class="dashicons dashicons-wordpress-alt"></i> <?php printf( __( 'Tested with %s', 'wporg-plugins' ), $tested_up_to ); ?></span> 41 <?php } ?> 42 </span> 44 <?php if ( $tested_up_to ) : ?> 45 <span class="tested-with"> 46 <i class="dashicons dashicons-wordpress-alt"></i> 47 <?php 48 /* translators: WordPress version. */ 49 printf( esc_html__( 'Tested with %s', 'wporg-plugins' ), esc_html( $tested_up_to ) ); 50 ?> 51 </span> 52 <?php endif; ?> 43 53 <span class="last-updated"> 44 <i class="dashicons dashicons-calendar"></i> <?php 45 /* Translators: Plugin modified time. */ 46 printf( __( 'Updated %s ago', 'wporg-plugins' ), human_time_diff( get_post_modified_time() ) ); ?> 54 <i class="dashicons dashicons-calendar"></i> 55 <?php 56 /* Translators: Plugin modified time. */ 57 printf( esc_html__( 'Updated %s ago', 'wporg-plugins' ), esc_html( human_time_diff( get_post_modified_time() ) ) ); 58 ?> 47 59 </span> 48 60 </span> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php
r6251 r6284 9 9 10 10 namespace WordPressdotorg\Plugin_Directory\Theme; 11 11 12 use WordPressdotorg\Plugin_Directory\Template; 12 13 … … 17 18 <?php the_closed_plugin_notice(); ?> 18 19 19 <h2><?php _e( 'Plugin Stats', 'wporg-plugins' ); ?></h2>20 <h2><?php esc_html_e( 'Plugin Stats', 'wporg-plugins' ); ?></h2> 20 21 21 <h4><?php _e( 'Active versions', 'wporg-plugins' ); ?></h4>22 <h4><?php esc_html_e( 'Active versions', 'wporg-plugins' ); ?></h4> 22 23 <div id="plugin-version-stats" class="chart version-stats"></div> 23 24 24 <h4><?php _e( 'Downloads Per Day', 'wporg-plugins' ); ?></h4>25 <h4><?php esc_html_e( 'Downloads Per Day', 'wporg-plugins' ); ?></h4> 25 26 <div id="plugin-download-stats" class="chart download-stats"></div> 26 27 27 <h4><?php _e( 'Active Install Growth', 'wporg-plugins' ); ?></h4>28 <h4><?php esc_html_e( 'Active Install Growth', 'wporg-plugins' ); ?></h4> 28 29 <div id="plugin-growth-stats" class="chart download-stats"></div> 29 30 30 <h5><?php _e( 'Downloads history', 'wporg-plugins' ); ?></h5>31 <h5><?php esc_html_e( 'Downloads history', 'wporg-plugins' ); ?></h5> 31 32 <table id="plugin-download-history-stats" class="download-history-stats"> 32 33 <tbody></tbody> … … 47 48 $tags = array_reverse( $tags ); 48 49 49 echo '<h5>' . __( 'Previous Versions', 'wporg-plugins' ) . '</h5>';50 echo '<div class="plugin-notice notice notice-info notice-alt"><p>' . __( 'Previous versions of this plugin may not be secure or stable and are available for testing purposes only.', 'wporg-plugins' ) . '</p></div>';50 echo '<h5>' . esc_html__( 'Previous Versions', 'wporg-plugins' ) . '</h5>'; 51 echo '<div class="plugin-notice notice notice-info notice-alt"><p>' . esc_html__( 'Previous versions of this plugin may not be secure or stable and are available for testing purposes only.', 'wporg-plugins' ) . '</p></div>'; 51 52 52 53 echo '<select class="previous-versions" onchange="getElementById(\'download-previous-link\').href=this.value;">'; 53 54 foreach ( $tags as $version ) { 54 $text = ( 'trunk' == $version ?__( 'Development Version', 'wporg-plugins' ) : $version );55 $text = ( 'trunk' === $version ? esc_html__( 'Development Version', 'wporg-plugins' ) : $version ); 55 56 printf( '<option value="%s">%s</option>', esc_attr( Template::download_link( $post, $version ) ), esc_html( $text ) ); 56 57 } … … 60 61 '<a href="%s" id="download-previous-link" class="button">%s</a>', 61 62 esc_url( Template::download_link( $post, reset( $tags ) ) ), 62 __( 'Download', 'wporg-plugins' )63 esc_html__( 'Download', 'wporg-plugins' ) 63 64 ); 64 65 } -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section.php
r5399 r6284 10 10 global $section, $section_slug, $section_content, $section_read_more; 11 11 12 $prefix = in_array( $section_slug, array( 'screenshots', 'faq' ), true ) ? '' : 'tab-'; 13 14 $classes = [ 'plugin-' . $section_slug, 'section' ]; 15 if ( $section_read_more ) { 16 $classes[] = 'read-more'; 17 } 18 $classes = implode( ' ', $classes ); 12 19 ?> 13 20 14 <div 15 <?php if ( !in_array ( $section_slug, array( 'screenshots','faq' ) ) ) { 16 $prefix = 'tab-'; 17 } else { 18 $prefix = ''; 19 } 20 ?> 21 id="<?php echo esc_attr( $prefix.$section_slug ); ?>" 22 class="plugin-<?php echo esc_attr( $section_slug ); ?> section <?php if ( $section_read_more ) { echo 'read-more'; } ?>" 23 > 24 <h2 id="<?php echo esc_attr( $section_slug . '-header' ); ?>"><?php echo $section['title']; ?></h2> 25 <?php echo $section_content; ?> 21 <div id="<?php echo esc_attr( $prefix . $section_slug ); ?>" class="<?php echo esc_attr( $classes ); ?>"> 22 <h2 id="<?php echo esc_attr( $section_slug . '-header' ); ?>"><?php echo esc_html( $section['title'] ); ?></h2> 23 <?php echo wp_kses_post( $section_content ); ?> 26 24 </div> 27 25 <?php if ( $section_read_more ) : ?> 28 <button 29 type="button" 30 class="button-link section-toggle" 31 aria-controls="<?php echo esc_attr( $prefix.$section_slug ); ?>" 32 aria-describedby="<?php echo esc_attr( $section_slug . '-header' ); ?>" 33 aria-expanded="false" 34 data-show-less="<?php esc_attr_e( 'Show less', 'wporg-plugins' ); ?>" 35 data-read-more="<?php esc_attr_e( 'Read more', 'wporg-plugins' ); ?>" 36 ><?php _e( 'Read more', 'wporg-plugins' ); ?></button> 26 <button 27 type="button" 28 class="button-link section-toggle" 29 aria-controls="<?php echo esc_attr( $prefix . $section_slug ); ?>" 30 aria-describedby="<?php echo esc_attr( $section_slug . '-header' ); ?>" 31 aria-expanded="false" 32 data-show-less="<?php esc_attr_e( 'Show less', 'wporg-plugins' ); ?>" 33 data-read-more="<?php esc_attr_e( 'Read more', 'wporg-plugins' ); ?>" 34 > 35 <?php esc_html_e( 'Read more', 'wporg-plugins' ); ?> 36 </button> 37 37 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.