Changeset 225583
- Timestamp:
- 04/05/2010 07:06:26 PM (16 years ago)
- File:
-
- 1 edited
-
custom-avatars-for-comments/trunk/inc/admin.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-avatars-for-comments/trunk/inc/admin.php
r225205 r225583 105 105 function init() { 106 106 if ( ! get_option ( 'commentavatars' ) ) 107 add_option ( 'commentavatars' , $this->defaults () );107 add_option ( 'commentavatars' , $this->defaults() ); 108 108 else 109 109 $this->check_upgrade(); … … 139 139 140 140 /** 141 * Reset the plugin config 142 * 143 * @return none 144 * @since 0.2.1.0 145 */ 146 function restore_defaults() { 147 $this->options = $this->defaults(); 148 update_option( 'commentavatars', $this->options ); 149 } 150 151 /** 141 152 * Add the options page 142 153 * … … 181 192 * @since 0.0.2 182 193 */ 183 function admin_page () { ?> 194 function admin_page () { 195 if ( $this->get_option( 'reset' ) === '1' ) 196 $this->restore_defaults(); ?> 184 197 <div id="nkuttler" class="wrap" > 185 198 <h2><?php _e( 'Custom Avatars For Comments', 'custom-avatars-for-comments' ) ?></h2> <?php … … 313 326 </tr> 314 327 328 <tr valign="top"> 329 <th scope="row"> <?php 330 _e( "Reset the form?", 'custom-avatars-for-comments' )?> 331 </th> 332 <td> 333 <input name="commentavatars[reset]" type="checkbox" value="1" /> 334 </td> 335 </tr> 336 315 337 </table> 316 338
Note: See TracChangeset
for help on using the changeset viewer.