admin_url( 'admin-ajax.php', $protocol ), 'text_select_file' => esc_html__( 'Select', 'vh' ), 'themeinstall' => admin_url("themes.php?page=themeoptions#first-time-visit") )); } // Styles add_action( 'admin_enqueue_scripts', 'slt_fs_styles' ); function slt_fs_styles() { wp_enqueue_style('thickbox'); } // Disable Flash uploader when this plugin invokes Media Library overlay add_action( 'admin_init', 'slt_fs_disable_flash_uploader' ); function slt_fs_disable_flash_uploader() { if ( basename( $_SERVER['SCRIPT_FILENAME'] ) == 'media-upload.php' && array_key_exists( 'slt_fs_field', $_GET ) ) add_filter( 'flash_uploader', create_function( '$a','return false;' ), 5 ); } // Output form button function slt_fs_button($name, $value, $label = 'Select file', $preview_size = 'thumbnail', $removable = true, $image = '') { // If we have already image then show it if (!empty($image)) { } if (is_array($preview_size)) { $preview_size = json_encode($preview_size); } ?>
  
'; } ?>
' . basename( $attachment_url ) . ''; }