Make WordPress Core

Ticket #51439: 51439.patch

File 51439.patch, 5.3 KB (added by ravipatel, 4 years ago)

Combile all chnages + $post_id missing to define on comment file.

  • src/wp-admin/credits.php

     
    44 *
    55 * @package WordPress
    66 * @subpackage Administration
     7 * @var string $title
    78 */
    89
    910/** WordPress Administration Bootstrap */
  • src/wp-admin/edit-comments.php

     
    44 *
    55 * @package WordPress
    66 * @subpackage Administration
     7 *
     8 * @global wpdb   $wpdb                   WordPress database abstraction object.
     9 * @global int $post_id
    710 */
    811
    912/** WordPress Administration Bootstrap */
    1013require_once __DIR__ . '/admin.php';
     14global $wpdb , $post_id;
     15
    1116if ( ! current_user_can( 'edit_posts' ) ) {
    1217        wp_die(
    1318                '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
     
    135140wp_enqueue_script( 'admin-comments' );
    136141enqueue_comment_hotkeys_js();
    137142
     143$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
     144
    138145if ( $post_id ) {
    139146        $comments_count      = wp_count_comments( $post_id );
    140147        $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' );
  • src/wp-admin/edit.php

     
    44 *
    55 * @package WordPress
    66 * @subpackage Administration
     7 * @global     string    $typenow
    78 */
    89
    910/** WordPress Administration Bootstrap */
    1011require_once __DIR__ . '/admin.php';
    1112
     13global $typenow;
     14
    1215if ( ! $typenow ) {
    1316        wp_die( __( 'Invalid post type.' ) );
    1417}
     
    2629/**
    2730 * @global string       $post_type
    2831 * @global WP_Post_Type $post_type_object
     32 * @global wpdb         $wpdb                   WordPress database abstraction object.
    2933 */
    30 global $post_type, $post_type_object;
     34global $wpdb, $post_type, $post_type_object;
    3135
    3236$post_type        = $typenow;
    3337$post_type_object = get_post_type_object( $post_type );
  • src/wp-admin/includes/ajax-actions.php

     
    426426 *
    427427 * @param int $comment_id
    428428 * @param int $delta
     429 * @var array $query_vars See {@link WP::parse_request()}.
    429430 */
    430431function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
    431432        $total    = isset( $_POST['_total'] ) ? (int) $_POST['_total'] : 0;
     
    36143615 * @global WP_Embed   $wp_embed   Embed API instance.
    36153616 * @global WP_Scripts $wp_scripts
    36163617 * @global int        $content_width
     3618 * @var    array      $matches
    36173619 */
    36183620function wp_ajax_parse_embed() {
    36193621        global $post, $wp_embed, $content_width;
  • src/wp-admin/includes/class-core-upgrader.php

     
    4545         *
    4646         * @global WP_Filesystem_Base $wp_filesystem                WordPress filesystem subclass.
    4747         * @global callable           $_wp_filesystem_direct_method
     48         * @global string             $wp_version                   The WordPress version string.
    4849         *
    4950         * @param object $current Response object for whether WordPress is current.
    5051         * @param array  $args {
     
    6061         * @return string|false|WP_Error New WordPress version on success, false or WP_Error on failure.
    6162         */
    6263        public function upgrade( $current, $args = array() ) {
    63                 global $wp_filesystem;
     64            global $wp_filesystem, $wp_version;
    6465
    6566                require ABSPATH . WPINC . '/version.php'; // $wp_version;
    6667
     
    267268         *
    268269         * @since 3.7.0
    269270         *
    270          * @param string $offered_ver The offered version, of the format x.y.z.
    271          * @return bool True if we should update to the offered version, otherwise false.
     271         * @global string  $wp_version       The WordPress version string.
     272         * @param  string  $offered_ver      The offered version, of the format x.y.z.
     273         * @return bool    True              if we should update to the offered version, otherwise false.
    272274         */
    273275        public static function should_update_to_version( $offered_ver ) {
     276            global $wp_version;
     277           
    274278                require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z
    275279
    276280                $current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version ), 0, 2 ) ); // x.y
  • src/wp-admin/install.php

     
    222222}
    223223
    224224/**
     225 * @global wpdb   $wpdb                   WordPress database abstraction object.
    225226 * @global string $wp_version             The WordPress version string.
    226227 * @global string $required_php_version   The required PHP version string.
    227228 * @global string $required_mysql_version The required MySQL version string.
    228229 */
    229 global $wp_version, $required_php_version, $required_mysql_version;
     230global $wp_version, $wpdb, $required_php_version, $required_mysql_version;
    230231
    231232$php_version   = phpversion();
    232233$mysql_version = $wpdb->db_version();