Ticket #12130: 12130.diff

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

Updated patch for trunk

Line 
1Index: wp-admin/includes/plugin.php
2===================================================================
3--- wp-admin/includes/plugin.php        (revision 12960)
4+++ wp-admin/includes/plugin.php        (working copy)
5@@ -21,6 +21,7 @@
6  * Description: Plugin Description
7  * Author: Plugin author's name
8  * Author URI: Link to the author's web site
9+ * Donate URI: Link to the donate to the plugin author
10  * Version: Must be set in the plugin for WordPress 2.3+
11  * Text Domain: Optional. Unique identifier, should be same as the one used in
12  *             plugin_text_domain()
13@@ -39,6 +40,7 @@
14  *             from the author.
15  *             'Author' - The author's name
16  *             'AuthorURI' - The authors web site address.
17+ *             'DonateURI' - Web address to donate to the plugin author.
18  *             'Version' - The plugin version number.
19  *             'PluginURI' - Plugin web site address.
20  *             'TextDomain' - Plugin's text domain for localization.
21@@ -75,7 +77,8 @@
22                'Author' => 'Author',
23                'AuthorURI' => 'Author URI',
24                'TextDomain' => 'Text Domain',
25-               'DomainPath' => 'Domain Path'
26+               'DomainPath' => 'Domain Path',
27+               'DonateURI' => 'Donate URI'
28                );
29 
30        $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' );
31@@ -98,7 +101,7 @@
32                else
33                        load_plugin_textdomain($plugin_data['TextDomain'], false, dirname($plugin_file));
34 
35-               foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version') as $field )
36+               foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version', 'DonateURI') as $field )
37                        $plugin_data[ $field ] = translate($plugin_data[ $field ], $plugin_data['TextDomain']);
38        }
39 
40Index: wp-admin/plugins.php
41===================================================================
42--- wp-admin/plugins.php        (revision 12960)
43+++ wp-admin/plugins.php        (working copy)
44@@ -533,7 +533,9 @@
45                }
46                if ( ! empty($plugin_data['PluginURI']) )
47                        $plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __( 'Visit plugin site' ) . '">' . __('Visit plugin site') . '</a>';
48-
49+               if ( ! empty($plugin_data['DonateURI']) )
50+                       $plugin_meta[] = '<a href="' . $plugin_data['DonateURI'] . '" title="' . __( 'Donate' ) . '">' . __('Donate') . '</a>';
51+                       
52                $plugin_meta = apply_filters('plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $context);
53                echo implode(' | ', $plugin_meta);
54                echo "</td>