Changeset 2625 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
- Timestamp:
- 02/25/2016 11:56:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r2621 r2625 23 23 private function __construct() { 24 24 add_action( 'add_meta_boxes', array( $this, 'register_admin_metaboxes' ) ); 25 add_action( 'edit_form_after_title', array( $this, 'edit_form_after_title' ) ); 25 26 } 26 27 … … 36 37 ); 37 38 } 39 40 /** 41 * Displays a link to the plugins zip file. 42 * 43 * @param \WP_Post $post 44 */ 45 public function edit_form_after_title( $post ) { 46 $zip_files = get_attached_media( 'application/zip', $post ); 47 $zip_file = current( $zip_files ); 48 49 if ( $zip_file ) : 50 ?> 51 52 <p style="padding: 0 10px;"> 53 <?php printf( __( '<strong>Zip file:</strong> %s' ), sprintf( '<a href="%s">%s</a>', esc_url( $zip_file->guid ), $zip_file->guid ) ); ?> 54 </p> 55 56 <?php 57 endif; 58 } 38 59 }
Note: See TracChangeset
for help on using the changeset viewer.