Making WordPress.org

Ticket #3443: 3443.patch

File 3443.patch, 1.1 KB (added by ocean90, 7 years ago)
  • trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

     
    13291329                $title = $args['post_title'] ?: $args['post_name'];
    13301330                $slug  = $args['post_name'] ?: sanitize_title( $title );
    13311331
     1332                $post_date     = current_time( 'mysql' );
     1333                $post_date_gmt = current_time( 'mysql', 1 );
     1334
    13321335                $args = wp_parse_args( $args, array(
    13331336                        'post_title'        => $title,
    13341337                        'post_name'         => $slug,
    13351338                        'post_type'         => 'plugin',
    1336                         'post_date'         => '',
    1337                         'post_date_gmt'     => '',
    1338                         'post_modified'     => '',
    1339                         'post_modified_gmt' => '',
     1339                        'post_date'         => $post_date,
     1340                        'post_date_gmt'     => $post_date_gmt,
     1341                        'post_modified'     => $post_date,
     1342                        'post_modified_gmt' => $post_date_gmt,
    13401343                ) );
    13411344
    13421345                $result = wp_insert_post( $args, true );