Changeset 3033724
- Timestamp:
- 02/09/2024 04:56:56 PM (2 years ago)
- Location:
- disable-author-archives/trunk
- Files:
-
- 2 edited
-
disable-author-archives.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
disable-author-archives/trunk/disable-author-archives.php
r3030853 r3033724 4 4 * Plugin URI: https://wordpress.org/plugins/disable-author-archives 5 5 * Description: Disables author archives and makes the web server return status code 404 ('Not Found') instead. 6 * Version: 1.3. 26 * Version: 1.3.3 7 7 * Author: freemp 8 8 * Author URI: https://profiles.wordpress.org/freemp … … 13 13 14 14 if ( ! defined( 'ABSPATH' ) ) exit; 15 16 load_plugin_textdomain( 'disable-author-archives', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );17 15 18 16 /* Return status code 404 for existing and non-existing author archives. */ … … 25 23 nocache_headers(); 26 24 } 27 }, 1 ); 25 } ); 26 28 27 /* Remove author links. */ 29 28 add_filter( 'user_row_actions', … … 32 31 unset( $actions['view'] ); 33 32 return $actions; 34 }, PHP_INT_MAX, 2 ); 35 add_filter( 'author_link', function() { return '#'; }, PHP_INT_MAX ); 36 add_filter( 'the_author_posts_link', '__return_empty_string', PHP_INT_MAX ); 33 }, PHP_INT_MAX ); 34 add_filter( 'author_link', 'get_the_author', PHP_INT_MAX ); 35 add_filter( 'the_author_posts_link', 'get_the_author', PHP_INT_MAX ); 36 add_filter( 'get_comment_author_link', 'get_comment_author', PHP_INT_MAX ); 37 38 /* Remove users from default sitemap. */ 37 39 if ( class_exists( 'WP_Sitemaps' ) ) 38 40 add_filter( 'wp_sitemaps_add_provider', -
disable-author-archives/trunk/readme.txt
r3030853 r3033724 29 29 == Changelog == 30 30 31 = 1.3.3 = 32 * Added removal of author links in comments. 33 * No longer remove author name, just the link to the author archive. 34 * Removed needless loading of plugin text domain 35 31 36 = 1.3.2 = 32 37 * Removed users section from WordPress built-in sitemap. Suggested by @constracti. Thanks!
Note: See TracChangeset
for help on using the changeset viewer.