Make WordPress Core

Ticket #32173: 32173.3.diff

File 32173.3.diff, 646 bytes (added by azaozz, 10 years ago)
  • src/wp-admin/includes/class-wp-press-this.php

     
    737737                                                }
    738738                                        }
    739739                                }
     740
     741                                // Support passing a single image src as `i`
     742                                if ( ! empty( $_REQUEST['i'] ) ) {
     743                                        $img_src = $this->_limit_img( wp_unslash( $_REQUEST['i'] ) );
     744
     745                                        if ( empty( $data['_images'] ) ) {
     746                                                $data['_images'] = array( $img_src );
     747                                        } else {
     748                                                array_unshift( $data['_images'], $img_src );
     749                                        }
     750                                }
    740751                        }
    741752                }
    742753