You appear to be a bot. Output may be restricted
Description
Adds an "Insert Download" button above the TinyMCE Editor on add/edit screens.
Usage
$string = edd_media_button();
Parameters
Returns
string "Insert Download" Button
Source
File name: easy-digital-downloads/includes/admin/thickbox.php
Lines:
1 to 14 of 14
function edd_media_button() { global $pagenow, $typenow; $output = ''; /** Only run in post/page creation and edit screens */ if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) && $typenow != 'download' ) { $img = '<span class="wp-media-buttons-icon dashicons dashicons-download" id="edd-media-button"></span>'; $output = '<a href="#TB_inline?width=640&inlineId=choose-download" class="thickbox button edd-thickbox" style="padding-left: .4em;">' . $img . sprintf( __( 'Insert %s', 'easy-digital-downloads' ), strtolower( edd_get_label_singular() ) ) . '</a>'; } echo $output; }