Making WordPress.org

Changeset 8774


Ignore:
Timestamp:
05/10/2019 06:31:40 PM (7 years ago)
Author:
coffee2code
Message:

Gutenberg theme: Prevent errors by also not defining get_current_screen() when run within WP-CLI context.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php

    r8698 r8774  
    1616 * `get_current_screen()`.
    1717 */
    18 if ( ! function_exists( 'get_current_screen' ) && ! is_admin() && ! wp_doing_cron() && ! wp_doing_ajax() && ! ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) ) {
     18if ( ! function_exists( 'get_current_screen' ) && ! is_admin() && ! wp_doing_cron() && ! wp_doing_ajax() && ! ( defined( 'WP_CLI' ) && WP_CLI ) &&  ! ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) ) {
    1919    function get_current_screen() {
    2020        return null;
Note: See TracChangeset for help on using the changeset viewer.