: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Customize API: WP_Customize_Upload_Control class
* Customize Upload Control Class.
* @see WP_Customize_Media_Control
class WP_Customize_Upload_Control extends WP_Customize_Media_Control {
* Media control mime type.
public $button_labels = array();
public $removed = ''; // Unused.
public $context; // Unused.
public $extensions = array(); // Unused.
* Refresh the parameters passed to the JavaScript via JSON.
* @uses WP_Customize_Media_Control::to_json()
public function to_json() {
// Get the attachment model for the existing file.
$attachment_id = attachment_url_to_postid( $value );
$this->json['attachment'] = wp_prepare_attachment_for_js( $attachment_id );