Make WordPress Core


Ignore:
Timestamp:
05/12/2020 06:38:02 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for functions in wp-admin/install-helper.php per the documentation standards.

Synchronize descriptions with the functions' counterparts from wp-admin/includes/upgrade.php.

See #49572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install-helper.php

    r47785 r47786  
    4040if ( ! function_exists( 'maybe_create_table' ) ) :
    4141        /**
    42          * Create database table, if it doesn't already exist.
     42         * Creates a table in the database if it doesn't already exist.
    4343         *
    4444         * @since 1.0.0
     
    4747         *
    4848         * @param string $table_name Database table name.
    49          * @param string $create_ddl Create database table SQL.
    50          * @return bool False on error, true if already exists or success.
     49         * @param string $create_ddl SQL statement to create table.
     50         * @return bool True on success or if the table already exists. False on failure.
    5151         */
    5252        function maybe_create_table( $table_name, $create_ddl ) {
     
    7575if ( ! function_exists( 'maybe_add_column' ) ) :
    7676        /**
    77          * Add column to database table, if column doesn't already exist in table.
     77         * Adds column to database table, if it doesn't already exist.
    7878         *
    7979         * @since 1.0.0
     
    8181         * @global wpdb $wpdb WordPress database abstraction object.
    8282         *
    83          * @param string $table_name Database table name
    84          * @param string $column_name Table column name
    85          * @param string $create_ddl SQL to add column to table.
    86          * @return bool False on failure. True, if already exists or was successful.
     83         * @param string $table_name  Database table name.
     84         * @param string $column_name Table column name.
     85         * @param string $create_ddl  SQL statement to add column.
     86         * @return bool True on success or if the column already exists. False on failure.
    8787         */
    8888        function maybe_add_column( $table_name, $column_name, $create_ddl ) {
     
    110110
    111111/**
    112  * Drop column from database table, if it exists.
     112 * Drops column from database table, if it exists.
    113113 *
    114114 * @since 1.0.0
     
    116116 * @global wpdb $wpdb WordPress database abstraction object.
    117117 *
    118  * @param string $table_name Table name
    119  * @param string $column_name Column name
    120  * @param string $drop_ddl SQL statement to drop column.
    121  * @return bool True on success or if the column doesn't exist, false on failure.
     118 * @param string $table_name  Database table name.
     119 * @param string $column_name Table column name.
     120 * @param string $drop_ddl    SQL statement to drop column.
     121 * @return bool True on success or if the column doesn't exist. False on failure.
    122122 */
    123123function maybe_drop_column( $table_name, $column_name, $drop_ddl ) {
     
    144144
    145145/**
    146  * Check column matches criteria.
     146 * Checks that database table column matches the criteria.
    147147 *
    148148 * Uses the SQL DESC for retrieving the table info for the column. It will help
     
    163163 * @global wpdb $wpdb WordPress database abstraction object.
    164164 *
    165  * @param string $table_name Table name
    166  * @param string $col_name   Column name
    167  * @param string $col_type   Column type
     165 * @param string $table_name Database table name.
     166 * @param string $col_name   Table column name.
     167 * @param string $col_type   Table column type.
    168168 * @param bool   $is_null    Optional. Check is null.
    169169 * @param mixed  $key        Optional. Key info.
Note: See TracChangeset for help on using the changeset viewer.