diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 6a249a93..06744200 100755 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -48,13 +48,13 @@ jobs: # Performs the following steps: # - Checks out the repository. # - Sets up PHP. - # - Logs debug information. # - Configures caching for PHPCS scans. - # - Installs Composer dependencies (use cache if possible). + # - Installs Composer dependencies. # - Make Composer packages available globally. - # - Logs PHP_CodeSniffer debug information. # - Runs PHPCS on the full codebase with warnings suppressed. + # - Generate a report for displaying issues as pull request annotations. # - Runs PHPCS on the `tests` directory without warnings suppressed. + # - Generate a report for displaying `test` directory issues as pull request annotations. # - Ensures version-controlled files are not modified or deleted. phpcs: name: PHP coding standards @@ -71,12 +71,7 @@ jobs: with: php-version: '7.4' coverage: none - tools: composer, cs2pr - - - name: Log debug information - run: | - php --version - composer --version + tools: cs2pr # This date is used to ensure that the PHPCS cache is cleared at least once every week. # http://man7.org/linux/man-pages/man1/date.1.html @@ -90,17 +85,16 @@ jobs: path: .cache/phpcs.json key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }} + # Since Composer dependencies are installed using `composer update` and no lock file is in version control, + # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 with: - composer-options: "--no-progress --no-ansi" + custom-cache-suffix: ${{ steps.get-date.outputs.date }} - name: Make Composer packages available globally run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH - - name: Log PHPCS debug information - run: phpcs -i - - name: Run PHPCS on all Core files id: phpcs-core run: phpcs -n --report-full --report-checkstyle=./.cache/phpcs-report.xml @@ -126,10 +120,9 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. - # - Installs Node.js. - # - Logs updated debug information. - # _ Installs npm dependencies. + # - Installs npm dependencies. # - Run the WordPress JSHint checks. # - Ensures version-controlled files are not modified or deleted. jshint: @@ -144,14 +137,7 @@ jobs: - name: Checkout repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - - name: Log debug information - run: | - npm --version - node --version - git --version - svn --version - - - name: Install Node.js + - name: Set up Node.js uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 with: node-version-file: '.nvmrc' @@ -161,8 +147,10 @@ jobs: run: | npm --version node --version + git --version + svn --version - - name: Install Dependencies + - name: Install npm Dependencies run: npm ci - name: Run JSHint diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 1d642ff4..661ec67d 100755 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -35,12 +35,11 @@ jobs: # Performs the following steps: # - Sets environment variables. # - Checks out the repository. + # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. - # - Installs Node.js. - # _ Installs npm dependencies. + # - Installs npm dependencies. # - Builds WordPress to run from the `build` directory. # - Starts the WordPress Docker container. - # - Logs general debug information. # - Logs the running Docker containers. # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container). # - Install WordPress within the Docker container. @@ -61,6 +60,12 @@ jobs: - name: Checkout repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - name: Set up Node.js + uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 + with: + node-version-file: '.nvmrc' + cache: npm + - name: Log debug information run: | npm --version @@ -68,17 +73,9 @@ jobs: curl --version git --version svn --version - php --version - php -i locale -a - - name: Install Node.js - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 - with: - node-version-file: '.nvmrc' - cache: npm - - - name: Install Dependencies + - name: Install npm Dependencies run: npm ci - name: Build WordPress @@ -88,14 +85,6 @@ jobs: run: | npm run env:start - - name: General debug information - run: | - npm --version - node --version - curl --version - git --version - svn --version - - name: Log running Docker containers run: docker ps -a diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index 2eeeb9a8..a64dc43c 100755 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -43,10 +43,9 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. - # - Installs Node.js. - # - Logs updated debug information. - # _ Installs npm dependencies. + # - Installs npm dependencies. # - Run the WordPress QUnit tests. # - Ensures version-controlled files are not modified or deleted. test-js: @@ -59,14 +58,7 @@ jobs: - name: Checkout repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - - name: Log debug information - run: | - npm --version - node --version - git --version - svn --version - - - name: Install Node.js + - name: Set up Node.js uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 with: node-version-file: '.nvmrc' @@ -76,8 +68,10 @@ jobs: run: | npm --version node --version + git --version + svn --version - - name: Install Dependencies + - name: Install npm Dependencies run: npm ci - name: Run QUnit tests diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index 411da95d..fce29378 100755 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -46,10 +46,10 @@ jobs: # - Sets up PHP. # - Logs debug information. # - Configures caching for PHP compatibility scans. - # - Installs Composer dependencies (use cache if possible). + # - Installs Composer dependencies. # - Make Composer packages available globally. - # - Logs PHP_CodeSniffer debug information. # - Runs the PHP compatibility tests. + # - Generate a report for displaying issues as pull request annotations. # - Ensures version-controlled files are not modified or deleted. php-compatibility: name: Check PHP compatibility @@ -66,11 +66,10 @@ jobs: with: php-version: '7.4' coverage: none - tools: composer, cs2pr + tools: cs2pr - name: Log debug information run: | - php --version composer --version # This date is used to ensure that the PHP compatibility cache is cleared at least once every week. @@ -85,17 +84,16 @@ jobs: path: .cache/phpcompat.json key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }} + # Since Composer dependencies are installed using `composer update` and no lock file is in version control, + # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 with: - composer-options: "--no-progress --no-ansi" + custom-cache-suffix: ${{ steps.get-date.outputs.date }} - name: Make Composer packages available globally run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH - - name: Log PHPCS debug information - run: phpcs -i - - name: Run PHP compatibility tests id: phpcs run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index c2276ca0..92ca0766 100755 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -36,22 +36,20 @@ jobs: # # Performs the following steps: # - Sets environment variables. - # - Sets up the environment variables needed for testing with memcached (if desired). - # - Installs Node.js. - # - Installs npm dependencies - # - Configures caching for Composer. + # - Checks out the repository. + # - Sets up Node.js. + # - Sets up PHP. # - Installs Composer dependencies. + # - Installs npm dependencies + # - Logs general debug information about the runner. # - Logs Docker debug information (about the Docker installation within the runner). # - Starts the WordPress Docker container. - # - Logs general debug information about the runner. # - Logs the running Docker containers. - # - Logs debug information from inside the WordPress Docker container. # - Logs debug information about what's installed within the WordPress Docker containers. # - Install WordPress within the Docker container. # - Run the PHPUnit tests. # - Ensures version-controlled files are not modified or deleted. # - Checks out the WordPress Test reporter repository. - # - Reconnect the directory to the Git repository. # - Submit the test results to the WordPress.org host test results. test-php: name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} @@ -108,43 +106,44 @@ jobs: - name: Checkout repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - - name: Install Node.js + - name: Set up Node.js uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 with: node-version-file: '.nvmrc' cache: npm - - name: Install Dependencies - run: npm ci - - # This date is used to ensure that the Composer cache is refreshed at least once every week. - # http://man7.org/linux/man-pages/man1/date.1.html - - name: "Get last Monday's date" - id: get-date - run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT - - - name: Get Composer cache directory - id: composer-cache - run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache Composer dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11 - env: - cache-name: cache-composer-dependencies + ## + # This allows Composer dependencies to be installed using a single step. + # + # Since the tests are currently run within the Docker containers where the PHP version varies, + # the same PHP version needs to be configured for the action runner machine so that the correct + # dependency versions are installed and cached. + ## + - name: Set up PHP + uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2.22.0 with: - path: ${{ steps.composer-cache.outputs.composer_dir }} - key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} + php-version: '${{ matrix.php }}' + coverage: none + # Since Composer dependencies are installed using `composer update` and no lock file is in version control, + # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - run: | - docker-compose run --rm php composer --version + uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 + with: + custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") - # Install using `composer update` as there is no `composer.lock` file. - if [ ${{ env.LOCAL_PHP }} == '8.2-fpm' ]; then - docker-compose run --rm php composer update --ignore-platform-req=php+ - else - docker-compose run --rm php composer update - fi + - name: Install npm dependencies + run: npm ci + + - name: General debug information + run: | + npm --version + node --version + curl --version + git --version + svn --version + composer --version + locale -a - name: Docker debug information run: | @@ -155,14 +154,6 @@ jobs: run: | npm run env:start - - name: General debug information - run: | - npm --version - node --version - curl --version - git --version - svn --version - - name: Log running Docker containers run: docker ps -a diff --git a/.github/workflows/test-and-zip-default-themes.yml b/.github/workflows/test-and-zip-default-themes.yml index 9c6cb3a6..f24efb45 100755 --- a/.github/workflows/test-and-zip-default-themes.yml +++ b/.github/workflows/test-and-zip-default-themes.yml @@ -49,9 +49,9 @@ jobs: # # Performs the following steps: # - Checks out the repository. - # - Installs Node.js (only when theme has a build process) - # - Installs npm dependencies (only when theme has a build process) - # - Runs the theme build script (only when theme has a build process) + # - Sets up Node.js. + # - Installs npm dependencies. + # - Runs the theme build script. # - Ensures version-controlled files are not modified or deleted. test-build-scripts: name: Test ${{ matrix.theme }} build script @@ -77,7 +77,7 @@ jobs: with: ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }} - - name: Install Node.js + - name: Set up Node.js uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index f91647ba..e07a7560 100755 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -32,26 +32,25 @@ env: LOCAL_PHP_MEMCACHED: ${{ false }} jobs: - # Sets up WordPress for testing or development use. + # Runs the PHPUnit tests for WordPress. # # Performs the following steps: # - Sets environment variables. # - Checks out the repository. - # - Checks out the WordPress Importer plugin (needed for the Core PHPUnit tests). - # - Logs debug information about the GitHub Action runner. - # - Installs Node.js. - # _ Installs npm dependencies. + # - Sets up Node.js. + # - Sets up PHP. + # - Installs Composer dependencies. + # - Installs npm dependencies + # - Logs general debug information about the runner. # - Logs Docker debug information (about the Docker installation within the runner). # - Starts the WordPress Docker container. - # - Logs debug general information. # - Logs the running Docker containers. - # - Logs WordPress Docker container debug information. # - Logs debug information about what's installed within the WordPress Docker containers. # - Install WordPress within the Docker container. # - Run the PHPUnit tests as a single site. # - Ensures version-controlled files are not modified or deleted. # - Upload the single site code coverage report to Codecov.io. - # - Run the PHPUnit tests as a multisite. + # - Run the PHPUnit tests as a multisite installation. # - Ensures version-controlled files are not modified or deleted. # - Upload the multisite code coverage report to Codecov.io. test-coverage-report: @@ -73,6 +72,35 @@ jobs: - name: Checkout repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - name: Set up Node.js + uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 + with: + node-version-file: '.nvmrc' + cache: npm + + ## + # This allows Composer dependencies to be installed using a single step. + # + # Since the tests are currently run within the Docker containers where the PHP version varies, + # the same PHP version needs to be configured for the action runner machine so that the correct + # dependency versions are installed and cached. + ## + - name: Set up PHP + uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2.22.0 + with: + php-version: '7.4' + coverage: none + + # Since Composer dependencies are installed using `composer update` and no lock file is in version control, + # passing a custom cache suffix ensures that the cache is flushed at least once per week. + - name: Install Composer dependencies + uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 + with: + custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") + + - name: Install npm Dependencies + run: npm ci + - name: Log debug information run: | echo "$GITHUB_REF" @@ -82,44 +110,9 @@ jobs: curl --version git --version svn --version - php --version - php -i + composer --version locale -a - - name: Install Node.js - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 - with: - node-version-file: '.nvmrc' - cache: npm - - - name: Install Dependencies - run: npm ci - - # This date is used to ensure that the Composer cache is refreshed at least once every week. - # http://man7.org/linux/man-pages/man1/date.1.html - - name: "Get last Monday's date" - id: get-date - run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT - - - name: Get Composer cache directory - id: composer-cache - run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache Composer dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11 - env: - cache-name: cache-composer-dependencies - with: - path: ${{ steps.composer-cache.outputs.composer_dir }} - key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} - - - name: Install Composer dependencies - run: | - docker-compose run --rm php composer --version - - # Install using `composer update` as there is no `composer.lock` file. - docker-compose run --rm php composer update - - name: Docker debug information run: | docker -v @@ -129,14 +122,6 @@ jobs: run: | npm run env:start - - name: General debug information - run: | - npm --version - node --version - curl --version - git --version - svn --version - - name: Log running Docker containers run: docker ps -a diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml index 7f38dd77..59b8adca 100755 --- a/.github/workflows/test-npm.yml +++ b/.github/workflows/test-npm.yml @@ -41,9 +41,9 @@ jobs: # # Performs the following steps: # - Checks out the repository. + # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. - # - Installs Node.js. - # _ Installs npm dependencies. + # - Installs npm dependencies. # - Builds WordPress to run from the `build` directory. # - Cleans up after building WordPress to the `build` directory. # - Ensures version-controlled files are not modified or deleted. @@ -64,6 +64,12 @@ jobs: - name: Checkout repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - name: Set up Node.js + uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 + with: + node-version-file: '.nvmrc' + cache: npm + - name: Log debug information run: | npm --version @@ -72,13 +78,7 @@ jobs: git --version svn --version - - name: Install Node.js - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 - with: - node-version-file: '.nvmrc' - cache: npm - - - name: Install Dependencies + - name: Install npm Dependencies run: npm ci - name: Build WordPress in /src @@ -104,11 +104,15 @@ jobs: # This is separate from the job above in order to use stricter conditions about when to run. # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate. # + # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is + # currently no way to determine the OS being used on a given job. + # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability. + # # Performs the following steps: # - Checks out the repository. + # - Sets up Node.js. # - Logs debug information about the GitHub Action runner. - # - Installs Node.js. - # _ Installs npm dependencies. + # - Installs npm dependencies. # - Builds WordPress to run from the `build` directory. # - Cleans up after building WordPress to the `build` directory. # - Ensures version-controlled files are not modified or deleted. @@ -124,6 +128,12 @@ jobs: - name: Checkout repository uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - name: Set up Node.js + uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 + with: + node-version-file: '.nvmrc' + cache: npm + - name: Log debug information run: | npm --version @@ -132,13 +142,7 @@ jobs: git --version svn --version - - name: Install Node.js - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1 - with: - node-version-file: '.nvmrc' - cache: npm - - - name: Install Dependencies + - name: Install npm Dependencies run: npm ci - name: Build WordPress in /src diff --git a/src/js/_enqueues/lib/nav-menu.js b/src/js/_enqueues/lib/nav-menu.js index 10b1330a..9877f782 100755 --- a/src/js/_enqueues/lib/nav-menu.js +++ b/src/js/_enqueues/lib/nav-menu.js @@ -1557,14 +1557,14 @@ }); }); - // Show bulk action + // Show bulk action. $( document ).on( 'menu-item-added', function() { if ( ! $( '.bulk-actions' ).is( ':visible' ) ) { $( '.bulk-actions' ).show(); } } ); - // Hide bulk action + // Hide bulk action. $( document ).on( 'menu-removing-item', function( e, el ) { var menuElement = $( el ).parents( '#menu-to-edit' ); if ( menuElement.find( 'li' ).length === 1 && $( '.bulk-actions' ).is( ':visible' ) ) { diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index 440d2a53..00a6d8c4 100755 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -1636,6 +1636,7 @@ div.action-links, font-style: normal; margin: 0; padding: 100px 0 0; + width: 100%; text-align: center; } diff --git a/src/wp-admin/includes/class-wp-site-health-auto-updates.php b/src/wp-admin/includes/class-wp-site-health-auto-updates.php index f6fb7d79..e3c02d06 100755 --- a/src/wp-admin/includes/class-wp-site-health-auto-updates.php +++ b/src/wp-admin/includes/class-wp-site-health-auto-updates.php @@ -277,7 +277,7 @@ public function test_vcs_abspath() { public function test_check_wp_filesystem_method() { // Make sure the `request_filesystem_credentials()` function is available during our REST API call. if ( ! function_exists( 'request_filesystem_credentials' ) ) { - require_once ABSPATH . '/wp-admin/includes/file.php'; + require_once ABSPATH . 'wp-admin/includes/file.php'; } $skin = new Automatic_Upgrader_Skin; @@ -328,7 +328,7 @@ public function test_all_files_writable() { // Make sure the `get_core_checksums()` function is available during our REST API call. if ( ! function_exists( 'get_core_checksums' ) ) { - require_once ABSPATH . '/wp-admin/includes/update.php'; + require_once ABSPATH . 'wp-admin/includes/update.php'; } $checksums = get_core_checksums( $wp_version, 'en_US' ); diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index abe0fc61..4300abd8 100755 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -65,7 +65,7 @@ public function __construct() { */ public function show_site_health_tab( $tab ) { if ( 'debug' === $tab ) { - require_once ABSPATH . '/wp-admin/site-health-info.php'; + require_once ABSPATH . 'wp-admin/site-health-info.php'; } } diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index a2b2c9ed..88c6d5d6 100755 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -911,6 +911,8 @@ public function maintenance_mode( $enable = false ) { * * @since 4.5.0 * + * @global wpdb $wpdb The WordPress database abstraction object. + * * @param string $lock_name The name of this unique lock. * @param int $release_timeout Optional. The duration in seconds to respect an existing lock. * Default: 1 hour. diff --git a/src/wp-admin/includes/export.php b/src/wp-admin/includes/export.php index 1c7694f0..ac673ec5 100755 --- a/src/wp-admin/includes/export.php +++ b/src/wp-admin/includes/export.php @@ -519,7 +519,8 @@ function wxr_filter_postmeta( $return_me, $meta_key ) { " /> @@ -2442,7 +2443,7 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false, // Make sure the `submit_button()` function is available during the REST API call // from WP_Site_Health_Auto_Updates::test_check_wp_filesystem_method(). if ( ! function_exists( 'submit_button' ) ) { - require_once ABSPATH . '/wp-admin/includes/template.php'; + require_once ABSPATH . 'wp-admin/includes/template.php'; } ?>

diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php index 741d02e9..8b98c229 100755 --- a/src/wp-admin/includes/ms.php +++ b/src/wp-admin/includes/ms.php @@ -8,7 +8,7 @@ */ /** - * Determine if uploaded file exceeds space quota. + * Determines whether uploaded file exceeds space quota. * * @since 3.0.0 * @@ -53,7 +53,7 @@ function check_upload_size( $file ) { } /** - * Delete a site. + * Deletes a site. * * @since 3.0.0 * @since 5.1.0 Use wp_delete_site() internally to delete the site row from the database. @@ -130,7 +130,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) { } /** - * Delete a user from the network and remove from all sites. + * Deletes a user from the network and remove from all sites. * * @since 3.0.0 * @@ -139,7 +139,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) { * @global wpdb $wpdb WordPress database abstraction object. * * @param int $id The user ID. - * @return bool True if the user was deleted, otherwise false. + * @return bool True if the user was deleted, false otherwise. */ function wpmu_delete_user( $id ) { global $wpdb; @@ -213,7 +213,7 @@ function wpmu_delete_user( $id ) { } /** - * Check whether a site has used its allotted upload space. + * Checks whether a site has used its allotted upload space. * * @since MU (3.0.0) * @@ -269,12 +269,12 @@ function display_space_usage() { } /** - * Get the remaining upload space for this site. + * Gets the remaining upload space for this site. * * @since MU (3.0.0) * - * @param int $size Current max size in bytes - * @return int Max size in bytes + * @param int $size Current max size in bytes. + * @return int Max size in bytes. */ function fix_import_form_size( $size ) { if ( upload_is_user_over_quota( false ) ) { @@ -783,7 +783,7 @@ function choose_primary_blog() { update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id ); } } else { - echo 'N/A'; + _e( 'Not available' ); } ?> @@ -793,7 +793,7 @@ function choose_primary_blog() { } /** - * Whether or not we can edit this network from this page. + * Determines whether or not this network from this page can be edited. * * By default editing of network is restricted to the Network Admin for that `$network_id`. * This function allows for this to be overridden. @@ -801,7 +801,7 @@ function choose_primary_blog() { * @since 3.1.0 * * @param int $network_id The network ID to check. - * @return bool True if network can be edited, otherwise false. + * @return bool True if network can be edited, false otherwise. */ function can_edit_network( $network_id ) { if ( get_current_network_id() === (int) $network_id ) { @@ -822,7 +822,7 @@ function can_edit_network( $network_id ) { } /** - * Thickbox image paths for Network Admin. + * Prints thickbox image paths for Network Admin. * * @since 3.1.0 * @@ -981,7 +981,7 @@ function confirm_delete_users( $users ) { } /** - * Print JavaScript in the header on the Network Settings screen. + * Prints JavaScript in the header on the Network Settings screen. * * @since 4.1.0 */ diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index ad8b04cf..0e09d311 100755 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -524,7 +524,7 @@ function wp_nav_menu_item_post_type_meta_box( $data_object, $box ) { -

+