Make WordPress Core


Ignore:
Timestamp:
09/11/2015 05:03:55 AM (9 years ago)
Author:
wonderboymusic
Message:

Create a new file, wp-admin/includes/noop.php, which loads all of the noop functions for load-script|styles.php and is only loaded by those files. DRYs in the process.

See #33813.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/load-styles.php

    r33734 r34037  
    1212define( 'WPINC', 'wp-includes' );
    1313
    14 /**
    15  * @ignore
    16  */
    17 function __() {}
    18 
    19 /**
    20  * @ignore
    21  */
    22 function _x() {}
    23 
    24 /**
    25  * @ignore
    26  */
    27 function add_filter() {}
    28 
    29 /**
    30  * @ignore
    31  */
    32 function esc_attr() {}
    33 
    34 /**
    35  * @ignore
    36  */
    37 function apply_filters() {}
    38 
    39 /**
    40  * @ignore
    41  */
    42 function get_option() {}
    43 
    44 /**
    45  * @ignore
    46  */
    47 function is_lighttpd_before_150() {}
    48 
    49 /**
    50  * @ignore
    51  */
    52 function add_action() {}
    53 
    54 /**
    55  * @ignore
    56  */
    57 function do_action_ref_array() {}
    58 
    59 /**
    60  * @ignore
    61  */
    62 function get_bloginfo() {}
    63 
    64 /**
    65  * @ignore
    66  */
    67 function is_admin() {return true;}
    68 
    69 /**
    70  * @ignore
    71  */
    72 function site_url() {}
    73 
    74 /**
    75  * @ignore
    76  */
    77 function admin_url() {}
    78 
    79 /**
    80  * @ignore
    81  */
    82 function wp_guess_url() {}
    83 
    84 /**
    85  *
    86  * @param string $path
    87  * @return string
    88  */
    89 function get_file($path) {
    90 
    91     if ( function_exists('realpath') )
    92         $path = realpath($path);
    93 
    94     if ( ! $path || ! @is_file($path) )
    95         return '';
    96 
    97     return @file_get_contents($path);
    98 }
    99 
     14require( ABSPATH . 'wp-admin/includes/noop.php' );
    10015require( ABSPATH . WPINC . '/script-loader.php' );
    10116require( ABSPATH . WPINC . '/version.php' );
Note: See TracChangeset for help on using the changeset viewer.