Making WordPress.org

Changeset 3326


Ignore:
Timestamp:
06/09/2016 10:28:14 PM (10 years ago)
Author:
obenland
Message:

Plugin Directory: Docs cleanup.

For a more at ease IDE.

See #1584.

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  
    359359         * Filter the permalink for terms to be more useful.
    360360         *
    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 ) {
    365366                if ( 'plugin_business_model' == $term->taxonomy ) {
    366367                        return false;
     
    371372                }
    372373
    373                 return $termlink;
     374                return $term_link;
    374375        }
    375376
     
    447448         * Returns the requested page's content, translated.
    448449         *
    449          * @param string $content
     450         * @param string $content Post content.
     451         * @param string $section Optional. Which readme section to translate.
    450452         * @return string
    451453         */
     
    454456                        return $content;
    455457                }
    456                 return Plugin_i18n::instance()->translate( $section, $content );
     458                return Plugin_I18n::instance()->translate( $section, $content );
    457459        }
    458460
     
    460462         * Returns the requested page's content, translated.
    461463         *
    462          * @param string $content
     464         * @param string $title
     465         * @param int    $post_id
    463466         * @return string
    464467         */
    465468        public function translate_post_title( $title, $post_id ) {
    466469                if ( $post_id === get_post()->ID ) {
    467                         return Plugin_i18n::instance()->translate( 'title', $title );
     470                        return Plugin_I18n::instance()->translate( 'title', $title );
    468471                }
    469472                return $title;
     
    473476         * Returns the requested page's excerpt, translated.
    474477         *
    475          * @param string $content
     478         * @param string $excerpt
    476479         * @return string
    477480         */
    478481        public function translate_post_excerpt( $excerpt ) {
    479                 return Plugin_i18n::instance()->translate( 'excerpt', $excerpt );
     482                return Plugin_I18n::instance()->translate( 'excerpt', $excerpt );
    480483        }
    481484
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php

    r3319 r3326  
    1212         * @var string Global cache group for related caching
    1313         */
    14         var $i18n_cache_group = 'plugins-i18n';
     14        public $i18n_cache_group = 'plugins-i18n';
     15
     16        public $master_project;
    1517
    1618        public static $use_cache = true;
    1719        public static $set_cache = true;
     20
     21        /**
     22         * @var \wpdb WordPress database abstraction object.
     23         */
     24        protected $db;
    1825
    1926        /**
     
    7582
    7683        /**
    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.
    8290         *
    8391         * @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  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory;
    3 use WordPressdotorg\Plugin_Directory\Markdown;
    43
    54/**
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

    r3187 r3326  
    1212         * Returns a string representing the number of active installs for an item.
    1313         *
    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.
    1617         */
    1718        static function active_installs( $full = true, $post = null ) {
     
    6768         * Displays a plugin's rating with the amount of ratings it has received.
    6869         *
    69          * @param \WP_Post|int $post
     70         * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
    7071         * @return string
    7172         */
    72         public static function get_star_rating( $post = 0 ) {
     73        public static function get_star_rating( $post = null ) {
    7374                $post = get_post( $post );
    7475
     
    8687
    8788        /**
     89         * @param int|\WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
    8890         * @return array
    8991         */
Note: See TracChangeset for help on using the changeset viewer.