Plugin Directory

Changeset 3033724


Ignore:
Timestamp:
02/09/2024 04:56:56 PM (2 years ago)
Author:
freemp
Message:

Added removal of author links in comments.
No longer remove author name, just the link to the author archive.
Removed needless loading of plugin text domain

Location:
disable-author-archives/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • disable-author-archives/trunk/disable-author-archives.php

    r3030853 r3033724  
    44 * Plugin URI: https://wordpress.org/plugins/disable-author-archives
    55 * Description: Disables author archives and makes the web server return status code 404 ('Not Found') instead.
    6  * Version: 1.3.2
     6 * Version: 1.3.3
    77 * Author: freemp
    88 * Author URI: https://profiles.wordpress.org/freemp
     
    1313
    1414if ( ! defined( 'ABSPATH' ) ) exit;
    15 
    16 load_plugin_textdomain( 'disable-author-archives', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    1715
    1816/* Return status code 404 for existing and non-existing author archives. */
     
    2523            nocache_headers();
    2624        }
    27     }, 1 );
     25    } );
     26
    2827/* Remove author links. */
    2928add_filter( 'user_row_actions',
     
    3231            unset( $actions['view'] );
    3332        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 );
     34add_filter( 'author_link', 'get_the_author', PHP_INT_MAX );
     35add_filter( 'the_author_posts_link', 'get_the_author', PHP_INT_MAX );
     36add_filter( 'get_comment_author_link', 'get_comment_author', PHP_INT_MAX );
     37
     38/* Remove users from default sitemap. */
    3739if ( class_exists( 'WP_Sitemaps' ) )
    3840    add_filter( 'wp_sitemaps_add_provider',
  • disable-author-archives/trunk/readme.txt

    r3030853 r3033724  
    2929== Changelog ==
    3030
     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
    3136= 1.3.2 =
    3237* Removed users section from WordPress built-in sitemap. Suggested by @constracti. Thanks!
Note: See TracChangeset for help on using the changeset viewer.