'', // show this when blank ); /* * Display for options and meta */ public function display() { self::createUploaderScript(); $this->echoOptionHeader(); // display the preview image $value = $this->getValue(); $previewImage = ''; if ( ! empty( $value ) ) { $previewImage = ""; } echo "
" . $previewImage . "
"; printf("   ", $this->getID(), $this->settings['placeholder'], $this->getID(), esc_attr( $this->getValue() ), __( "Upload", TF_I18NDOMAIN ) ); $this->echoOptionFooter(); } /* * Display for theme customizer */ public function registerCustomizerControl( $wp_customize, $section, $priority = 1 ) { $wp_customize->add_control( new TitanFrameworkOptionUploadControl( $wp_customize, $this->getID(), array( 'label' => $this->settings['name'], 'section' => $section->getID(), 'settings' => $this->getID(), 'description' => $this->settings['desc'], 'priority' => $priority, ) ) ); } public static function createUploaderScript() { if ( ! self::$firstLoad ) { return; } self::$firstLoad = false; ?> value(); if ( ! empty( $value ) ) { $previewImage = ""; } ?> {$this->description}

"; } } }