Make WordPress Core

Ticket #12130: 12130.diff

File 12130.diff, 2.3 KB (added by Otto42, 15 years ago)

Updated patch for trunk

  • wp-admin/includes/plugin.php

     
    2121 * Description: Plugin Description
    2222 * Author: Plugin author's name
    2323 * Author URI: Link to the author's web site
     24 * Donate URI: Link to the donate to the plugin author
    2425 * Version: Must be set in the plugin for WordPress 2.3+
    2526 * Text Domain: Optional. Unique identifier, should be same as the one used in
    2627 *              plugin_text_domain()
     
    3940 *              from the author.
    4041 *              'Author' - The author's name
    4142 *              'AuthorURI' - The authors web site address.
     43 *              'DonateURI' - Web address to donate to the plugin author.
    4244 *              'Version' - The plugin version number.
    4345 *              'PluginURI' - Plugin web site address.
    4446 *              'TextDomain' - Plugin's text domain for localization.
     
    7577                'Author' => 'Author',
    7678                'AuthorURI' => 'Author URI',
    7779                'TextDomain' => 'Text Domain',
    78                 'DomainPath' => 'Domain Path'
     80                'DomainPath' => 'Domain Path',
     81                'DonateURI' => 'Donate URI'
    7982                );
    8083
    8184        $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' );
     
    98101                else
    99102                        load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file));
    100103
    101                 foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version') as $field )
     104                foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version', 'DonateURI') as $field )
    102105                        $plugin_data[ $field ] = translate($plugin_data[ $field ], $plugin_data['TextDomain']);
    103106        }
    104107
  • wp-admin/plugins.php

     
    533533                }
    534534                if ( ! empty($plugin_data['PluginURI']) )
    535535                        $plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __( 'Visit plugin site' ) . '">' . __('Visit plugin site') . '</a>';
    536 
     536                if ( ! empty($plugin_data['DonateURI']) )
     537                        $plugin_meta[] = '<a href="' . $plugin_data['DonateURI'] . '" title="' . __( 'Donate' ) . '">' . __('Donate') . '</a>';
     538                       
    537539                $plugin_meta = apply_filters('plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $context);
    538540                echo implode(' | ', $plugin_meta);
    539541                echo "</td>