Changeset 3326
- Timestamp:
- 06/09/2016 10:28:14 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r3323 r3326 359 359 * Filter the permalink for terms to be more useful. 360 360 * 361 * @param string $termlink The generated term link. 362 * @param \WP_Term $term The term the link is for. 363 */ 364 public function term_link( $termlink, $term ) { 361 * @param string $term_link The generated term link. 362 * @param \WP_Term $term The term the link is for. 363 * @return string|false 364 */ 365 public function term_link( $term_link, $term ) { 365 366 if ( 'plugin_business_model' == $term->taxonomy ) { 366 367 return false; … … 371 372 } 372 373 373 return $term link;374 return $term_link; 374 375 } 375 376 … … 447 448 * Returns the requested page's content, translated. 448 449 * 449 * @param string $content 450 * @param string $content Post content. 451 * @param string $section Optional. Which readme section to translate. 450 452 * @return string 451 453 */ … … 454 456 return $content; 455 457 } 456 return Plugin_ i18n::instance()->translate( $section, $content );458 return Plugin_I18n::instance()->translate( $section, $content ); 457 459 } 458 460 … … 460 462 * Returns the requested page's content, translated. 461 463 * 462 * @param string $content 464 * @param string $title 465 * @param int $post_id 463 466 * @return string 464 467 */ 465 468 public function translate_post_title( $title, $post_id ) { 466 469 if ( $post_id === get_post()->ID ) { 467 return Plugin_ i18n::instance()->translate( 'title', $title );470 return Plugin_I18n::instance()->translate( 'title', $title ); 468 471 } 469 472 return $title; … … 473 476 * Returns the requested page's excerpt, translated. 474 477 * 475 * @param string $ content478 * @param string $excerpt 476 479 * @return string 477 480 */ 478 481 public function translate_post_excerpt( $excerpt ) { 479 return Plugin_ i18n::instance()->translate( 'excerpt', $excerpt );482 return Plugin_I18n::instance()->translate( 'excerpt', $excerpt ); 480 483 } 481 484 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php
r3319 r3326 12 12 * @var string Global cache group for related caching 13 13 */ 14 var $i18n_cache_group = 'plugins-i18n'; 14 public $i18n_cache_group = 'plugins-i18n'; 15 16 public $master_project; 15 17 16 18 public static $use_cache = true; 17 19 public static $set_cache = true; 20 21 /** 22 * @var \wpdb WordPress database abstraction object. 23 */ 24 protected $db; 18 25 19 26 /** … … 75 82 76 83 /** 77 * Cache setting, with proper global cache group 78 * 79 * @param string $slug Plugin slug 80 * @param string $branch dev|stable 81 * @param string $suffix Arbitrary cache key suffix, if needed for uniqueness 84 * Cache setting, with proper global cache group. 85 * 86 * @param string $slug Plugin slug 87 * @param string $branch dev|stable 88 * @param mixed $content Content to be cached. 89 * @param string $suffix Optional. Arbitrary cache key suffix, if needed for uniqueness. 82 90 * 83 91 * @return bool As returned by wp_cache_set() -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-readme-parser.php
r3212 r3326 1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory; 3 use WordPressdotorg\Plugin_Directory\Markdown;4 3 5 4 /** -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r3187 r3326 12 12 * Returns a string representing the number of active installs for an item. 13 13 * 14 * @param bool $full whether to include "actuve installs" suffix. Default: true. 15 * @return string "1+ million" or "1+ milllion active installs" depending on $full. 14 * @param bool $full Whether to include "active installs" suffix. Default: true. 15 * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 16 * @return string "1+ million" or "1+ million active installs" depending on $full. 16 17 */ 17 18 static function active_installs( $full = true, $post = null ) { … … 67 68 * Displays a plugin's rating with the amount of ratings it has received. 68 69 * 69 * @param \WP_Post|int $post70 * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 70 71 * @return string 71 72 */ 72 public static function get_star_rating( $post = 0) {73 public static function get_star_rating( $post = null ) { 73 74 $post = get_post( $post ); 74 75 … … 86 87 87 88 /** 89 * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 88 90 * @return array 89 91 */
Note: See TracChangeset
for help on using the changeset viewer.