Changeset 627884
- Timestamp:
- 11/20/2012 08:53:37 PM (13 years ago)
- Location:
- image-metadata-cruncher
- Files:
-
- 2 edited
-
tags/1.1/image-metadata-cruncher.php (modified) (4 diffs)
-
trunk/image-metadata-cruncher.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-metadata-cruncher/tags/1.1/image-metadata-cruncher.php
r627803 r627884 22 22 private $pattern; 23 23 public $plugin_name = 'Image Metadata Cruncher'; 24 private $version = 1.1; 25 private $after_update = FALSE; 24 26 25 27 /** … … 27 29 */ 28 30 function __construct() { 31 $options = get_option( $this->plugin_name ); 32 $this->after_update = intval( $options['version'] ) < intval( $this->version ); 29 33 30 34 // the EXIF and IPTC mapping arrays are quite long, so they deserve to be in separate files … … 598 602 public function defaults() { 599 603 add_option( $this->prefix, array( 604 'version' => 1.1, 600 605 'title' => '{ IPTC:Headline }', 601 606 'alt' => '', 602 607 'caption' => '', 603 'enable_highlighting' => ' on',608 'enable_highlighting' => 'enable', 604 609 'description' => '{ IPTC:Caption | EXIF:ImageDescription }', 605 610 'custom_meta' => array() … … 777 782 /////////////////////////////////// 778 783 779 public function section_0() { ?> 784 public function section_0() { 785 $options = get_option( $this->prefix ); 786 if ( intval( $options['version'] ) < 1.1 ) { 787 $options['enable_highlighting'] = 'enable'; 788 } 789 ?> 780 790 <p> 781 791 The fancy syntax highlighting of template tags may in some cases cause strange caret/cursor behaviour. 782 792 If you encounter any of such problems, you can disable this feature here. 783 793 </p> 784 <?php $options = get_option( $this->prefix ); ?> 785 <input type="checkbox" <?php checked( 'on', $options['enable_highlighting'] ); ?> name="<?php echo $this->prefix; ?>[enable_highlighting]" id="enable-highlighting" /> 794 <input type="checkbox" value="enable" <?php checked( 'enable', $options['enable_highlighting'] ); ?> name="<?php echo $this->prefix; ?>[enable_highlighting]" id="enable-highlighting" /> 786 795 <label for="highlighting">Enable highlighting</label> 787 796 <?php } -
image-metadata-cruncher/trunk/image-metadata-cruncher.php
r627803 r627884 22 22 private $pattern; 23 23 public $plugin_name = 'Image Metadata Cruncher'; 24 private $version = 1.1; 25 private $after_update = FALSE; 24 26 25 27 /** … … 27 29 */ 28 30 function __construct() { 31 $options = get_option( $this->plugin_name ); 32 $this->after_update = intval( $options['version'] ) < intval( $this->version ); 29 33 30 34 // the EXIF and IPTC mapping arrays are quite long, so they deserve to be in separate files … … 598 602 public function defaults() { 599 603 add_option( $this->prefix, array( 604 'version' => 1.1, 600 605 'title' => '{ IPTC:Headline }', 601 606 'alt' => '', 602 607 'caption' => '', 603 'enable_highlighting' => ' on',608 'enable_highlighting' => 'enable', 604 609 'description' => '{ IPTC:Caption | EXIF:ImageDescription }', 605 610 'custom_meta' => array() … … 777 782 /////////////////////////////////// 778 783 779 public function section_0() { ?> 784 public function section_0() { 785 $options = get_option( $this->prefix ); 786 if ( intval( $options['version'] ) < 1.1 ) { 787 $options['enable_highlighting'] = 'enable'; 788 } 789 ?> 780 790 <p> 781 791 The fancy syntax highlighting of template tags may in some cases cause strange caret/cursor behaviour. 782 792 If you encounter any of such problems, you can disable this feature here. 783 793 </p> 784 <?php $options = get_option( $this->prefix ); ?> 785 <input type="checkbox" <?php checked( 'on', $options['enable_highlighting'] ); ?> name="<?php echo $this->prefix; ?>[enable_highlighting]" id="enable-highlighting" /> 794 <input type="checkbox" value="enable" <?php checked( 'enable', $options['enable_highlighting'] ); ?> name="<?php echo $this->prefix; ?>[enable_highlighting]" id="enable-highlighting" /> 786 795 <label for="highlighting">Enable highlighting</label> 787 796 <?php }
Note: See TracChangeset
for help on using the changeset viewer.