Changeset 720768
- Timestamp:
- 05/31/2013 10:08:26 AM (13 years ago)
- Location:
- attachment-cruncher/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (3 diffs)
-
attachment-cruncher.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
attachment-cruncher/trunk/README.txt
r720327 r720768 5 5 Requires at least: 2.7 6 6 Tested up to: 3.5.1 7 Stable tag: 0. 27 Stable tag: 0.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 62 62 63 63 Copy the **attachment-cruncher** folder into the plugins directory and activate. 64 PHP 5.3 or higher is required (the plugin uses anonymous functions).65 64 66 65 == Screenshots == … … 69 68 70 69 == Changelog == 70 71 = 0.3 = 72 * Works now also with PHP 5.2. 71 73 72 74 = 0.2 = -
attachment-cruncher/trunk/attachment-cruncher.php
r720327 r720768 3 3 Plugin Name: Attachment Cruncher 4 4 Description: A Swiss Army Knife for transfering media attachment properties to post properties. 5 Version: 0. 25 Version: 0.3 6 6 Author: Peter Hudec 7 7 Author URI: http://peterhudec.com … … 15 15 16 16 public $plugin_name = 'Attachment Cruncher'; 17 private $version = 0. 2;17 private $version = 0.3; 18 18 private $prefix = 'attachment_cruncher'; 19 19 private $settings_slug = 'attachment-cruncher'; … … 130 130 * Returns IDs of all atachments attached to the post. 131 131 */ 132 p rivatefunction get_attached_attachments( $post_id ) {132 public function get_attached_attachments( $post_id ) { 133 133 134 134 // Collect attachments objects … … 140 140 ) ); 141 141 142 function attachment_id( $attachment ){ 143 return $attachment->ID; 144 } 145 142 146 // Return only IDs. 143 return array_map( function ( $attachment ) { 144 return $attachment->ID; 145 }, $attachment_posts ); 147 return array_map( 'attachment_id', $attachment_posts ); 146 148 } 147 149
Note: See TracChangeset
for help on using the changeset viewer.