Plugin Directory

Changeset 182792


Ignore:
Timestamp:
12/14/2009 06:51:02 PM (16 years ago)
Author:
plpetitclerc
Message:
 
Location:
wp-prettyphoto
Files:
2 edited
6 copied

Legend:

Unmodified
Added
Removed
  • wp-prettyphoto/tags/1.5.4/readme.txt

    r172860 r182792  
    44Requires at least: 2.7
    55Tested up to: 2.8.6
    6 Stable tag: 1.5.3
     6Stable tag: 1.5.4
    77Author: Pier-Luc Petitclerc
    88Author URI: http://blog.fusi0n.org
     
    4848
    4949== ChangeLog ==
     50
     51= Version 1.5.4 =
     52
     53* Fixed Settings Page bug
    5054
    5155= Version 1.5.3 =
  • wp-prettyphoto/tags/1.5.4/wp-prettyphoto.php

    r172860 r182792  
    44Plugin URI: http://blog.fusi0n.org/category/wp-prettyphoto
    55Description: prettyPhoto is a jQuery based lightbox clone. Not only does it support images, it also add support for videos, flash, YouTube, iFrame. It's a full blown media modal box. WP-prettyPhoto embeds those functionalities in WordPress.
    6 Version: 1.5.3
     6Version: 1.5.4
    77Author: Pier-Luc Petitclerc
    88Author URI: http://blog.fusi0n.org
     
    5959    else {
    6060      $this->loadLocale(get_locale());
    61       add_action('admin_init', array(&$this, 'wppp_section_register'));
    62       add_action('admin_menu', array(&$this, 'wppp_admin_menu'));
     61      add_action('admin_init', array(&$this, 'wppp_admin_init'));
     62      add_action('admin_menu', array(&$this, 'wppp_hooks_admin'));
    6363      add_action('plugin_action_links_'.plugin_basename(__FILE__), array(&$this, 'wppp_plugin_links'));
    6464    }
     
    146146   * @since 1.4
    147147  */
    148   public function wppp_section_register() {
    149     // add_settings_section($id, $title, $callback, $page)
    150     //add_settings_section('wp-prettyphoto', 'WP-prettyPhoto Options', array(&$this, 'wppp_section_callback'), 'media');
    151     //add_settings_section('wppp_automate', 'Automation', array(&$this, 'wppp_section_automate'), 'media');
    152     //add_settings_section('wppp_appearance', 'Appearance', array(&$this, 'wppp_section_appearance'), 'media');
    153     //add_settings_section('wppp_technical', 'Technical', array(&$this, 'wppp_section_technical'), 'media');
     148  public function wppp_admin_init() {
    154149    foreach ($this->opts as $optName => $optVal) {
    155150      register_setting('prettyphoto', $optName);
    156       // add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array())
    157       //add_settings_field($optName, $optVal['name'], array(&$this, 'wppp_settings_'.$optName), 'media', 'wppp_'.$optVal['section']);
    158     }
     151    }
     152  }
     153
     154  public function wppp_hooks_admin() {
     155    add_options_page('WP-prettyPhoto', 'WP-prettyPhoto', 'edit_files', __FILE__, array(&$this, 'wppp_options_page'));
    159156  }
    160157
     
    182179  }
    183180
    184   public function wppp_admin_menu() {
    185     add_options_page('WP-prettyPhoto', 'WP-prettyPhoto', 'edit_files', __FILE__, array(&$this, 'wppp_options_page'));
    186   }
    187 
    188181  private function _getOptionsBySection() {
    189182    $section = array();
     
    208201      <h2>WP prettyPhoto Options</h2>
    209202      <form method="post" action="options.php">
     203EOHTML;
     204    $plugin_options = implode(',', array_keys($this->opts));
     205    $nonce =    (function_exists('settings_fields'))? settings_fields('prettyphoto') : wp_nonce_field('update-options').'<input type="hidden" name="action" value="update" /><input type="hidden" name="page_options" value="'.$plugin_options.'" />';
     206    echo <<<EOHTML
    210207        <input type="hidden" name="action" value="update" />
    211208        <h3>Automation</h3>
     
    222219        {$technical}
    223220        <p class="submit">
    224           <input type="submit" name="Submit" value="'._('Save Changes').'" />
     221          <input type="submit" name="Submit" value="Save Changes" />
    225222        </p>
    226223      </form>
    227224    </div>
    228225EOHTML;
    229     if (function_exists('settings_fields')) { settings_fields('prettyphoto'); }
    230     else { wp_nonce_field('update-options'); }
    231226  }
    232227
  • wp-prettyphoto/trunk/readme.txt

    r172860 r182792  
    44Requires at least: 2.7
    55Tested up to: 2.8.6
    6 Stable tag: 1.5.3
     6Stable tag: 1.5.4
    77Author: Pier-Luc Petitclerc
    88Author URI: http://blog.fusi0n.org
     
    4848
    4949== ChangeLog ==
     50
     51= Version 1.5.4 =
     52
     53* Fixed Settings Page bug
    5054
    5155= Version 1.5.3 =
  • wp-prettyphoto/trunk/wp-prettyphoto.php

    r172860 r182792  
    44Plugin URI: http://blog.fusi0n.org/category/wp-prettyphoto
    55Description: prettyPhoto is a jQuery based lightbox clone. Not only does it support images, it also add support for videos, flash, YouTube, iFrame. It's a full blown media modal box. WP-prettyPhoto embeds those functionalities in WordPress.
    6 Version: 1.5.3
     6Version: 1.5.4
    77Author: Pier-Luc Petitclerc
    88Author URI: http://blog.fusi0n.org
     
    5959    else {
    6060      $this->loadLocale(get_locale());
    61       add_action('admin_init', array(&$this, 'wppp_section_register'));
    62       add_action('admin_menu', array(&$this, 'wppp_admin_menu'));
     61      add_action('admin_init', array(&$this, 'wppp_admin_init'));
     62      add_action('admin_menu', array(&$this, 'wppp_hooks_admin'));
    6363      add_action('plugin_action_links_'.plugin_basename(__FILE__), array(&$this, 'wppp_plugin_links'));
    6464    }
     
    146146   * @since 1.4
    147147  */
    148   public function wppp_section_register() {
    149     // add_settings_section($id, $title, $callback, $page)
    150     //add_settings_section('wp-prettyphoto', 'WP-prettyPhoto Options', array(&$this, 'wppp_section_callback'), 'media');
    151     //add_settings_section('wppp_automate', 'Automation', array(&$this, 'wppp_section_automate'), 'media');
    152     //add_settings_section('wppp_appearance', 'Appearance', array(&$this, 'wppp_section_appearance'), 'media');
    153     //add_settings_section('wppp_technical', 'Technical', array(&$this, 'wppp_section_technical'), 'media');
     148  public function wppp_admin_init() {
    154149    foreach ($this->opts as $optName => $optVal) {
    155150      register_setting('prettyphoto', $optName);
    156       // add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array())
    157       //add_settings_field($optName, $optVal['name'], array(&$this, 'wppp_settings_'.$optName), 'media', 'wppp_'.$optVal['section']);
    158     }
     151    }
     152  }
     153
     154  public function wppp_hooks_admin() {
     155    add_options_page('WP-prettyPhoto', 'WP-prettyPhoto', 'edit_files', __FILE__, array(&$this, 'wppp_options_page'));
    159156  }
    160157
     
    182179  }
    183180
    184   public function wppp_admin_menu() {
    185     add_options_page('WP-prettyPhoto', 'WP-prettyPhoto', 'edit_files', __FILE__, array(&$this, 'wppp_options_page'));
    186   }
    187 
    188181  private function _getOptionsBySection() {
    189182    $section = array();
     
    208201      <h2>WP prettyPhoto Options</h2>
    209202      <form method="post" action="options.php">
     203EOHTML;
     204    $plugin_options = implode(',', array_keys($this->opts));
     205    $nonce =    (function_exists('settings_fields'))? settings_fields('prettyphoto') : wp_nonce_field('update-options').'<input type="hidden" name="action" value="update" /><input type="hidden" name="page_options" value="'.$plugin_options.'" />';
     206    echo <<<EOHTML
    210207        <input type="hidden" name="action" value="update" />
    211208        <h3>Automation</h3>
     
    222219        {$technical}
    223220        <p class="submit">
    224           <input type="submit" name="Submit" value="'._('Save Changes').'" />
     221          <input type="submit" name="Submit" value="Save Changes" />
    225222        </p>
    226223      </form>
    227224    </div>
    228225EOHTML;
    229     if (function_exists('settings_fields')) { settings_fields('prettyphoto'); }
    230     else { wp_nonce_field('update-options'); }
    231226  }
    232227
Note: See TracChangeset for help on using the changeset viewer.