type . '-' . $this->id; $data['label'] = html_entity_decode( $this->label, ENT_QUOTES, get_bloginfo( 'charset' ) ); $data['value'] = $this->value(); $data['link'] = $this->get_link(); $data['mime_type'] = $this->mime_type; if ( 'image' === $this->mime_type ) { $i18n = array( 'uploader_title' => esc_html__( 'Select Image' ), 'uploader_button_text' => esc_html__( 'Choose Image' ), ); } elseif ( 'video' === $this->mime_type ) { $i18n = array( 'uploader_title' => esc_html__( 'Select Video' ), 'uploader_button_text' => esc_html__( 'Choose Video' ), ); } elseif ( 'audio' === $this->mime_type ) { $i18n = array( 'uploader_title' => esc_html__( 'Select Audio' ), 'uploader_button_text' => esc_html__( 'Choose Audio' ), ); } else { $i18n = array( 'uploader_title' => esc_html__( 'Select Attachment' ), 'uploader_button_text' => esc_html__( 'Choose Attachment' ), ); } $data['i18n'] = $i18n; return $data; } /** * Render JS template. * * @since 1.0.0 */ public function content_template() { ?> <# if ( data.label ) { #> {{ data.label }} <# } #> <# if ( data.description ) { #> {{ data.description }} <# } #>
<# if ( 'image' === data.mime_type ) { #>
<# } #>