WordPress.org

Making WordPress.org

Ticket #1700: 1700.diff

File 1700.diff, 2.2 KB (added by ChopinBach, 5 years ago)

Changes the error message for the Plugin Upload Handler for plugin names that already exit.

  • wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php

    diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
    index e00fc9e..cb89c64 100644
    class Upload_Handler { 
    9898                // Is there already a plugin by a different author?
    9999                if ( $plugin_post instanceof \WP_Post && $plugin_post->post_author != get_current_user_id() ) {
    100100                        /* translators: 1: plugin slug, 2: style.css */
    101                         return sprintf( __( 'There is already a plugin called %1$s by a different author. Please change the name of your plugin and upload it again.', 'wporg-plugins' ),
     101                        return sprintf( __( 'There is already a plugin called %1$s by a different author. Please change the name of your plugin in the plugin header file and upload it again.', 'wporg-plugins' ),
    102102                                '<code>' . $this->plugin_slug . '</code>'
    103103                        );
    104104                }