Make WordPress Core

Changeset 42787


Ignore:
Timestamp:
03/05/2018 09:49:53 PM (9 years ago)
Author:
johnbillion
Message:

Docs: Standardise and correct documentation relating to parameters which accept plugin names.

See #42505

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-plugin-installer-skin.php

    r42343 r42787  
    9494                 *                                for non-API installs, such as when a plugin is installed
    9595                 *                                via upload.
    96                  * @param string $plugin_file     Path to the plugin file.
     96                 * @param string $plugin_file     Path to the plugin file relative to the plugins directory.
    9797                 */
    9898                $install_actions = apply_filters( 'install_plugin_complete_actions', $install_actions, $this->api, $plugin_file );
  • trunk/src/wp-admin/includes/class-plugin-upgrader-skin.php

    r42343 r42787  
    6666                 *
    6767                 * @param array  $update_actions Array of plugin action links.
    68                  * @param string $plugin         Path to the plugin file.
     68                 * @param string $plugin         Path to the plugin file relative to the plugins directory.
    6969                 */
    7070                $update_actions = apply_filters( 'update_plugin_complete_actions', $update_actions, $this->plugin );
  • trunk/src/wp-admin/includes/class-plugin-upgrader.php

    r42786 r42787  
    136136         * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
    137137         *
    138          * @param string $plugin The basename path to the main plugin file.
     138         * @param string $plugin Path to the plugin file relative to the plugins directory.
    139139         * @param array  $args {
    140140         *     Optional. Other arguments for upgrading a plugin package. Default empty array.
    … …  
    210210         * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
    211211         *
    212          * @param array $plugins Array of the basename paths of the plugins' main files.
    213          * @param array $args {
    214          *     Optional. Other arguments for upgrading several plugins at once. Default empty array.
    215          *
    216          *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
    217          *                                    Default true.
     212         * @param string[] $plugins Array of paths to plugin files relative to the plugins directory.
     213         * @param array    $args {
     214         *     Optional. Other arguments for upgrading several plugins at once.
     215         *
     216         *     @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. Default true.
    218217         * }
    219218         * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r42343 r42787  
    828828                                         *                            including the version, author,
    829829                                         *                            author URI, and plugin URI.
    830                                          * @param string $plugin_file Path to the plugin file, relative to the plugins directory.
     830                                         * @param string $plugin_file Path to the plugin file relative to the plugins directory.
    831831                                         * @param array  $plugin_data An array of plugin data.
    832832                                         * @param string $status      Status of the plugin. Defaults are 'All', 'Active',
    … …  
    850850                                         *
    851851                                         * @param string $column_name Name of the column.
    852                                          * @param string $plugin_file Path to the plugin file.
     852                                         * @param string $plugin_file Path to the plugin file relative to the plugins directory.
    853853                                         * @param array  $plugin_data An array of plugin data.
    854854                                         */
    … …  
    866866                 * @since 2.3.0
    867867                 *
    868                  * @param string $plugin_file Path to the plugin file, relative to the plugins directory.
     868                 * @param string $plugin_file Path to the plugin file relative to the plugins directory.
    869869                 * @param array  $plugin_data An array of plugin data.
    870870                 * @param string $status      Status of the plugin. Defaults are 'All', 'Active',
    … …  
    882882                 * @since 2.7.0
    883883                 *
    884                  * @param string $plugin_file Path to the plugin file, relative to the plugins directory.
     884                 * @param string $plugin_file Path to the plugin file relative to the plugins directory.
    885885                 * @param array  $plugin_data An array of plugin data.
    886886                 * @param string $status      Status of the plugin. Defaults are 'All', 'Active',
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r42777 r42787  
    692692                 *         @type string $type                 Type of update process. Accepts 'plugin', 'theme', or 'core'.
    693693                 *         @type bool   $bulk                 Whether the update process is a bulk update. Default true.
    694                  *         @type string $plugin               The base plugin path from the plugins directory.
     694                 *         @type string $plugin               Path to the plugin file relative to the plugins directory.
    695695                 *         @type string $theme                The stylesheet or template name of the theme.
    696696                 *         @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',
  • trunk/src/wp-admin/includes/file.php

    r42777 r42787  
    176176 * @since 4.9.0
    177177 *
    178  * @param string $plugin Path to the main plugin file from plugins directory.
     178 * @param string $plugin Path to the plugin file relative to the plugins directory.
    179179 * @return string[] Array of editable file extensions.
    180180 */
    … …  
    223223         *
    224224         * @param string[] $editable_extensions An array of editable plugin file extensions.
    225          * @param string   $plugin              Path to the main plugin file from plugins directory.
     225         * @param string   $plugin              Path to the plugin file relative to the plugins directory.
    226226         */
    227227        $editable_extensions = (array) apply_filters( 'editable_extensions', $editable_extensions, $plugin );
    … …  
    343343 *
    344344 *     @type string $file       Relative path to file.
    345  *     @type string $plugin     Plugin being edited.
     345 *     @type string $plugin     Path to the plugin file relative to the plugins directory.
    346346 *     @type string $theme      Theme being edited.
    347347 *     @type string $newcontent New content for the file.
  • trunk/src/wp-admin/includes/plugin.php

    r42778 r42787  
    4848 * @since 1.5.0
    4949 *
    50  * @param string $plugin_file Path to the main plugin file.
     50 * @param string $plugin_file Absolute path to the main plugin file.
    5151 * @param bool   $markup      Optional. If the returned data should have HTML markup applied.
    5252 *                            Default true.
    … …  
    195195 * @since 2.8.0
    196196 *
    197  * @param string $plugin Path to the main plugin file from plugins directory.
     197 * @param string $plugin Path to the plugin file relative to the plugins directory.
    198198 * @return array List of files relative to the plugin root.
    199199 */
    … …  
    471471 * @since 2.5.0
    472472 *
    473  * @param string $plugin Path to the main plugin file from plugins directory.
     473 * @param string $plugin Path to the plugin file relative to the plugins directory.
    474474 * @return bool True, if in the active plugins list. False, not in the list.
    475475 */
    … …  
    490490 * @see is_plugin_active()
    491491 *
    492  * @param string $plugin Path to the main plugin file from plugins directory.
     492 * @param string $plugin Path to the plugin file relative to the plugins directory.
    493493 * @return bool True if inactive. False if active.
    494494 */
    … …  
    511511 * @since 3.0.0
    512512 *
    513  * @param string $plugin Path to the main plugin file from plugins directory.
     513 * @param string $plugin Path to the plugin file relative to the plugins directory.
    514514 * @return bool True if active for the network, otherwise false.
    515515 */
    … …  
    536536 * @since 3.0.0
    537537 *
    538  * @param string $plugin Path to the main plugin file from plugins directory.
     538 * @param string $plugin Path to the plugin file relative to the plugins directory.
    539539 * @return bool True if plugin is network only, false otherwise.
    540540 */
    … …  
    567567 * @since 2.5.0
    568568 *
    569  * @param string $plugin       Path to the main plugin file from plugins directory.
     569 * @param string $plugin       Path to the plugin file relative to the plugins directory.
    570570 * @param string $redirect     Optional. URL to redirect to.
    571571 * @param bool   $network_wide Optional. Whether to enable the plugin for all sites in the network
    … …  
    609609                         * @since 2.9.0
    610610                         *
    611                          * @param string $plugin       Path to the main plugin file from plugins directory.
     611                         * @param string $plugin       Path to the plugin file relative to the plugins directory.
    612612                         * @param bool   $network_wide Whether to enable the plugin for all sites in the network
    613613                         *                             or just the current site. Multisite only. Default is false.
    … …  
    651651                         * @since 2.9.0
    652652                         *
    653                          * @param string $plugin       Path to the main plugin file from plugins directory.
     653                         * @param string $plugin       Path to the plugin file relative to the plugins directory.
    654654                         * @param bool   $network_wide Whether to enable the plugin for all sites in the network
    655655                         *                             or just the current site. Multisite only. Default is false.
    … …  
    705705                         * @since 2.9.0
    706706                         *
    707                          * @param string $plugin               Path to the main plugin file from plugins directory.
     707                         * @param string $plugin               Path to the plugin file relative to the plugins directory.
    708708                         * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network
    709709                         *                                     or just the current site. Multisite only. Default is false.
    … …  
    753753                         * @since 2.9.0
    754754                         *
    755                          * @param string $plugin               Path to the main plugin file from plugins directory.
     755                         * @param string $plugin               Path to the plugin file relative to the plugins directory.
    756756                         * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network.
    757757                         *                                     or just the current site. Multisite only. Default false.
    … …  
    815815 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
    816816 *
    817  * @param array  $plugins    List of plugins to delete.
    818  * @param string $deprecated Deprecated.
    819  * @return bool|null|WP_Error True on success, false if `$plugins` is empty, WP_Error on failure.
    820  *                            Null if filesystem credentials are required to proceed.
     817 * @param string[] $plugins    List of plugin paths to delete, relative to the plugins directory.
     818 * @param string   $deprecated Not used.
     819 * @return bool|null|WP_Error True on success, false if `$plugins` is empty, `WP_Error` on failure.
     820 *                            `null` if filesystem credentials are required to proceed.
    821821 */
    822822function delete_plugins( $plugins, $deprecated = '' ) {
    … …  
    893893                 * @since 4.4.0
    894894                 *
    895                  * @param string $plugin_file Plugin file name.
     895                 * @param string $plugin_file Path to the plugin file relative to the plugins directory.
    896896                 */
    897897                do_action( 'delete_plugin', $plugin_file );
    … …  
    911911                 * @since 4.4.0
    912912                 *
    913                  * @param string $plugin_file Plugin file name.
     913                 * @param string $plugin_file Path to the plugin file relative to the plugins directory.
    914914                 * @param bool   $deleted     Whether the plugin deletion was successful.
    915915                 */
    … …  
    10061006 * @since 2.5.0
    10071007 *
    1008  * @param string $plugin Path to the main plugin file from plugins directory.
     1008 * @param string $plugin Path to the plugin file relative to the plugins directory.
    10091009 * @return WP_Error|int 0 on success, WP_Error on failure.
    10101010 */
    … …  
    10291029 * @since 2.7.0
    10301030 *
    1031  * @param string $plugin Path to the main plugin file from plugins directory.
     1031 * @param string $plugin Path to the plugin file relative to the plugins directory.
    10321032 * @return bool Whether plugin can be uninstalled.
    10331033 */
    … …  
    10501050 * @since 2.7.0
    10511051 *
    1052  * @param string $plugin Path to the main plugin file from plugins directory.
     1052 * @param string $plugin Path to the plugin file relative to the plugins directory.
    10531053 * @return true True if a plugin's uninstall.php file has been found and included.
    10541054 */
    … …  
    10631063         * @since 4.5.0
    10641064         *
    1065          * @param string $plugin                Path to the main plugin file from plugins directory.
     1065         * @param string $plugin                Path to the plugin file relative to the plugins directory.
    10661066         * @param array  $uninstallable_plugins Uninstallable plugins.
    10671067         */
    … …  
    20092009 * @since 4.4.0 Function was moved into the `wp-admin/includes/plugin.php` file.
    20102010 *
    2011  * @param string $plugin Plugin file to load.
     2011 * @param string $plugin Path to the plugin file relative to the plugins directory.
    20122012 */
    20132013function plugin_sandbox_scrape( $plugin ) {
  • trunk/src/wp-includes/functions.php

    r42719 r42787  
    50715071 * @since 2.9.0
    50725072 *
    5073  * @param string $file            Path to the file.
    5074  * @param array  $default_headers List of headers, in the format array('HeaderKey' => 'Header Name').
     5073 * @param string $file            Absolute path to the file.
     5074 * @param array  $default_headers List of headers, in the format `array('HeaderKey' => 'Header Name')`.
    50755075 * @param string $context         Optional. If specified adds filter hook {@see 'extra_$context_headers'}.
    50765076 *                                Default empty.
  • trunk/src/wp-includes/load.php

    r42723 r42787  
    654654 * While upgrading or installing WordPress, no plugins are returned.
    655655 *
    656  * The default directory is wp-content/plugins. To change the default
     656 * The default directory is `wp-content/plugins`. To change the default
    657657 * directory manually, define `WP_PLUGIN_DIR` and `WP_PLUGIN_URL`
    658  * in wp-config.php.
    659  *
    660  * @since 3.0.0
    661  * @access private
    662  *
    663  * @return array Files.
     658 * in `wp-config.php`.
     659 *
     660 * @since 3.0.0
     661 * @access private
     662 *
     663 * @return string[] $plugin_file Array of paths to plugin files relative to the plugins directory.
    664664 */
    665665function wp_get_active_and_valid_plugins() {
Note: See TracChangeset for help on using the changeset viewer.