Changeset 1448797
- Timestamp:
- 07/04/2016 08:13:49 PM (10 years ago)
- Location:
- featured-image-notes
- Files:
-
- 6 edited
-
tags/1.0.1/admin/partials/featured-image-notes-admin-display.php (modified) (1 diff)
-
tags/1.0.1/featured-image-notes.php (modified) (1 diff)
-
tags/1.0.1/public/class-featured-image-notes-public.php (modified) (1 diff)
-
trunk/admin/partials/featured-image-notes-admin-display.php (modified) (1 diff)
-
trunk/featured-image-notes.php (modified) (1 diff)
-
trunk/public/class-featured-image-notes-public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
featured-image-notes/tags/1.0.1/admin/partials/featured-image-notes-admin-display.php
r1365077 r1448797 46 46 foreach($post_types as $post_type) : 47 47 if(post_type_supports($post_type->name, 'thumbnail')) : 48 $value = ($options ) ? $options[$post_type->name] : '';48 $value = ($options && isset($options[$post_type->name])) ? $options[$post_type->name] : ''; 49 49 ?> 50 50 <tr class="alternative"> -
featured-image-notes/tags/1.0.1/featured-image-notes.php
r1365077 r1448797 6 6 * Plugin URI: http://www.drewrawitz.com 7 7 * Description: This plugin allows you to add notes to the Featured Image box for certain posts / pages 8 * Version: 1.0. 08 * Version: 1.0.1 9 9 * Author: Drew Rawitz 10 10 * Author URI: http://www.drewrawitz.com -
featured-image-notes/tags/1.0.1/public/class-featured-image-notes-public.php
r1365077 r1448797 23 23 class Featured_Image_Notes_Public { 24 24 25 /**26 * The ID of this plugin.27 *28 * @since 1.0.029 * @access private30 * @var string $plugin_name The ID of this plugin.31 */32 private $plugin_name;25 /** 26 * The ID of this plugin. 27 * 28 * @since 1.0.0 29 * @access private 30 * @var string $plugin_name The ID of this plugin. 31 */ 32 private $plugin_name; 33 33 34 /**35 * The version of this plugin.36 *37 * @since 1.0.038 * @access private39 * @var string $version The current version of this plugin.40 */41 private $version;34 /** 35 * The version of this plugin. 36 * 37 * @since 1.0.0 38 * @access private 39 * @var string $version The current version of this plugin. 40 */ 41 private $version; 42 42 43 /**44 * Initialize the class and set its properties.45 *46 * @since 1.0.047 * @param string $plugin_name The name of the plugin.48 * @param string $version The version of this plugin.49 */50 public function __construct( $plugin_name, $version ) {43 /** 44 * Initialize the class and set its properties. 45 * 46 * @since 1.0.0 47 * @param string $plugin_name The name of the plugin. 48 * @param string $version The version of this plugin. 49 */ 50 public function __construct( $plugin_name, $version ) { 51 51 52 $this->plugin_name = $plugin_name;53 $this->version = $version;52 $this->plugin_name = $plugin_name; 53 $this->version = $version; 54 54 55 }55 } 56 56 57 /**58 * Register the hooks59 *60 * @since 1.0.061 */62 public function add_hooks() {57 /** 58 * Register the hooks 59 * 60 * @since 1.0.0 61 */ 62 public function add_hooks() { 63 63 add_filter('admin_post_thumbnail_html', 'featured_image_notes'); 64 64 65 65 function featured_image_notes($content) { 66 global $post; 67 $data = null; 66 68 $options = get_option('featured-image-notes'); 67 switch(get_post_type()) { 68 default: 69 foreach($options as $key => $value) : 70 if(get_post_type() === $key) : 71 $notes = $value; 72 return $notes . $content; 73 endif; 74 endforeach; 75 } 69 70 if($options && isset($options[$post->post_type])) { 71 $data .= $options[$post->post_type]; 76 72 } 77 } 73 74 $data .= $content; 75 76 return $data; 77 } 78 } 78 79 } 80 -
featured-image-notes/trunk/admin/partials/featured-image-notes-admin-display.php
r1365077 r1448797 46 46 foreach($post_types as $post_type) : 47 47 if(post_type_supports($post_type->name, 'thumbnail')) : 48 $value = ($options ) ? $options[$post_type->name] : '';48 $value = ($options && isset($options[$post_type->name])) ? $options[$post_type->name] : ''; 49 49 ?> 50 50 <tr class="alternative"> -
featured-image-notes/trunk/featured-image-notes.php
r1448792 r1448797 6 6 * Plugin URI: http://www.drewrawitz.com 7 7 * Description: This plugin allows you to add notes to the Featured Image box for certain posts / pages 8 * Version: 1.0. 08 * Version: 1.0.1 9 9 * Author: Drew Rawitz 10 10 * Author URI: http://www.drewrawitz.com -
featured-image-notes/trunk/public/class-featured-image-notes-public.php
r1365077 r1448797 23 23 class Featured_Image_Notes_Public { 24 24 25 /**26 * The ID of this plugin.27 *28 * @since 1.0.029 * @access private30 * @var string $plugin_name The ID of this plugin.31 */32 private $plugin_name;25 /** 26 * The ID of this plugin. 27 * 28 * @since 1.0.0 29 * @access private 30 * @var string $plugin_name The ID of this plugin. 31 */ 32 private $plugin_name; 33 33 34 /**35 * The version of this plugin.36 *37 * @since 1.0.038 * @access private39 * @var string $version The current version of this plugin.40 */41 private $version;34 /** 35 * The version of this plugin. 36 * 37 * @since 1.0.0 38 * @access private 39 * @var string $version The current version of this plugin. 40 */ 41 private $version; 42 42 43 /**44 * Initialize the class and set its properties.45 *46 * @since 1.0.047 * @param string $plugin_name The name of the plugin.48 * @param string $version The version of this plugin.49 */50 public function __construct( $plugin_name, $version ) {43 /** 44 * Initialize the class and set its properties. 45 * 46 * @since 1.0.0 47 * @param string $plugin_name The name of the plugin. 48 * @param string $version The version of this plugin. 49 */ 50 public function __construct( $plugin_name, $version ) { 51 51 52 $this->plugin_name = $plugin_name;53 $this->version = $version;52 $this->plugin_name = $plugin_name; 53 $this->version = $version; 54 54 55 }55 } 56 56 57 /**58 * Register the hooks59 *60 * @since 1.0.061 */62 public function add_hooks() {57 /** 58 * Register the hooks 59 * 60 * @since 1.0.0 61 */ 62 public function add_hooks() { 63 63 add_filter('admin_post_thumbnail_html', 'featured_image_notes'); 64 64 65 65 function featured_image_notes($content) { 66 global $post; 67 $data = null; 66 68 $options = get_option('featured-image-notes'); 67 switch(get_post_type()) { 68 default: 69 foreach($options as $key => $value) : 70 if(get_post_type() === $key) : 71 $notes = $value; 72 return $notes . $content; 73 endif; 74 endforeach; 75 } 69 70 if($options && isset($options[$post->post_type])) { 71 $data .= $options[$post->post_type]; 76 72 } 77 } 73 74 $data .= $content; 75 76 return $data; 77 } 78 } 78 79 } 80
Note: See TracChangeset
for help on using the changeset viewer.