Changeset 1410240
- Timestamp:
- 05/04/2016 10:35:05 AM (10 years ago)
- Location:
- smart-archive-page-remove
- Files:
-
- 6 added
- 5 edited
-
assets/banner-772x250.png (modified) (previous)
-
assets/icon-128x128.png (modified) (previous)
-
assets/screenshot-1.png (modified) (previous)
-
tags/1.1 (added)
-
tags/1.1/pluginicon.png (added)
-
tags/1.1/readme.txt (added)
-
tags/1.1/smart-archive-page-remove.php (added)
-
tags/1.1/uninstall.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/smart-archive-page-remove.php (modified) (7 diffs)
-
trunk/uninstall.php (added)
Legend:
- Unmodified
- Added
- Removed
-
smart-archive-page-remove/trunk/readme.txt
r1406210 r1410240 4 4 Tags: archive page, archive pages, remove archive, remove archive pages, delete archive, delete archive pages, hide archive, hide archive pages 5 5 Requires at least: 3.0 6 Tested up to: 4. 37 Stable tag: 1. 06 Tested up to: 4.5 7 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 > This Plugin allows you to remove Archive Pages automatically generated by WordPress 16 16 17 **See also [Plugin Homepage](http://smartware.cc/free-wordpress-plugins/ 404page/) and [Plugin Doc](http://smartware.cc/docs/404page/)**17 **See also [Plugin Homepage](http://smartware.cc/free-wordpress-plugins/smart-archive-page-remove/) and [Plugin Doc](http://smartware.cc/docs/smart-archive-page-remove/)** 18 18 19 19 WordPress automatically generates several archives for your posts: … … 74 74 == Changelog == 75 75 76 = 1.1 (2016-05-04) = 77 * some backend styling 78 * translations moved to GlotPress 79 * delete settings on uninstall 80 * fixed issue - settings not saved the very first time 81 76 82 = 1.0 (2015-01-24) = 77 83 * Initial Release -
smart-archive-page-remove/trunk/smart-archive-page-remove.php
r1405710 r1410240 4 4 Plugin URI: http://smartware.cc/free-wordpress-plugins/smart-archive-page-remove 5 5 Description: Completely remove unwated Archive Pages from your Blog 6 Version: 1.1 beta 26 Version: 1.1 7 7 Author: smartware.cc, Peter's Plugins 8 8 Author URI: http://smartware.cc … … 46 46 $this->plugin_name = 'smart Archive Page Remove'; 47 47 $this->plugin_slug = 'smart-archive-page-remove'; 48 $this->version = '1.1 beta 2';48 $this->version = '1.1'; 49 49 $this->option_name = 'smart_archive_page_remove'; 50 50 $this->init(); … … 54 54 private function get_settings() { 55 55 $this->settings = array(); 56 $options = get_option( $this->option_name ); 57 if ( $options == '' ) { 58 $settings = array(); 59 } else { 60 $settings = unserialize( $options ); 61 } 56 $settings = get_option( $this->option_name ); 62 57 $defaults = array( 63 58 'author' => false, … … 68 63 'yearly' => false 69 64 ); 70 $this->settings = shortcode_atts( $defaults, $settings ); 65 if ( $settings == '' ) { 66 $this->settings = $defaults; 67 update_option( $this->option_name, serialize( $settings ) ); 68 } else { 69 $this->settings = shortcode_atts( $defaults, unserialize( $settings ) ); 70 } 71 71 } 72 72 … … 171 171 // echo title for settings section 172 172 function admin_section_title() { 173 echo '<p><strong>' . __( 'Remove the following Archive Pages', 'smart-archive-page-remove' ) . '</strong> </p><hr />';173 echo '<p><strong>' . __( 'Remove the following Archive Pages', 'smart-archive-page-remove' ) . '</strong> <a class="dashicons dashicons-editor-help" href="' . $this->dc_url .'"></a></p><hr />'; 174 174 } 175 175 … … 279 279 <div class="inside"> 280 280 <ul> 281 <li><div class="dashicons dashicons-wordpress"></div> <a href="<a href="<?php echo $this->wp_url; ?>/faq/"><?php _e( 'Take a look at the FAQ section', 'smart-archive-page-remove' ); ?></a></li> 281 <li><div class="dashicons dashicons-book-alt"></div> <a href="<?php echo $this->dc_url; ?>"><?php _e( 'Take a look at the Plugin Doc', '404page' ); ?></a></li> 282 <li><div class="dashicons dashicons-wordpress"></div> <a href="<?php echo $this->wp_url; ?>/faq/"><?php _e( 'Take a look at the FAQ section', 'smart-archive-page-remove' ); ?></a></li> 282 283 <li><div class="dashicons dashicons-wordpress"></div> <a href="http://wordpress.org/support/plugin/<?php echo $this->plugin_slug; ?>"><?php _e( 'Take a look at the Support section', 'smart-archive-page-remove'); ?></a></li> 283 284 <li><div class="dashicons dashicons-admin-comments"></div> <a href="http://smartware.cc/contact/"><?php _e( 'Feel free to contact the Author', 'smart-archive-page-remove' ); ?></a></li> … … 308 309 return array_merge( $links, array( '<a href="' . admin_url( 'options-general.php?page=smartarchivepageremovesettings' ) . '">' . __( 'Settings' ) . '</a>') ); 309 310 } 311 312 // uninstall plugin 313 function uninstall() { 314 if( is_multisite() ) { 315 $this->uninstall_network(); 316 } else { 317 $this->uninstall_single(); 318 } 319 } 320 321 // uninstall network wide 322 function uninstall_network() { 323 global $wpdb; 324 $activeblog = $wpdb->blogid; 325 $blogids = $wpdb->get_col( esc_sql( 'SELECT blog_id FROM ' . $wpdb->blogs ) ); 326 foreach ($blogids as $blogid) { 327 switch_to_blog( $blogid ); 328 $this->uninstall_single(); 329 } 330 switch_to_blog( $activeblog ); 331 } 332 333 // uninstall single blog 334 function uninstall_single() { 335 delete_option( $this->option_name ); 336 } 310 337 311 338 }
Note: See TracChangeset
for help on using the changeset viewer.