Changeset 3180196
- Timestamp:
- 11/01/2024 11:18:56 PM (16 months ago)
- Location:
- wp-custom-author-url
- Files:
-
- 6 edited
- 2 copied
-
tags/2.1.0 (copied) (copied from wp-custom-author-url/trunk)
-
tags/2.1.0/README.txt (modified) (1 diff)
-
tags/2.1.0/includes/class-wp-custom-author-url-settings.php (modified) (8 diffs)
-
tags/2.1.0/trunk (copied) (copied from wp-custom-author-url/trunk)
-
tags/2.1.0/trunk/README.txt (modified) (2 diffs)
-
tags/2.1.0/trunk/includes/class-wp-custom-author-url-settings.php (modified) (8 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/class-wp-custom-author-url-settings.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-custom-author-url/tags/2.1.0/README.txt
r3117891 r3180196 4 4 Requires at least: 3.0.1 5 5 Requires PHP: 5.6 6 Tested up to: 6. 67 Stable tag: 2. 0.26 Tested up to: 6.7 7 Stable tag: 2.1.0 8 8 License: GPL-3.0+ 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
wp-custom-author-url/tags/2.1.0/includes/class-wp-custom-author-url-settings.php
r3099881 r3180196 51 51 add_settings_field( 52 52 'redirect_all_authors', // ID used to identify the field throughout the theme 53 __( 'Redirect All Author URLs?', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element53 __( 'Redirect All Author URLs?', 'wp-custom-author-url' ), // The label to the left of the option interface element 54 54 array( $this, 'redirect_all_authors_callback' ), // The name of the function responsible for rendering the option interface 55 55 'wp_custom_author_url_global_options', // The page on which this option will be displayed 56 56 'global_settings_section', // The name of the section to which this field belongs 57 57 array( // The array of arguments to pass to the callback. In this case, just a description. 58 __( 'This will redirect all author names & author pages to the URL specified below.', 'wp-custom-author-url -plugin' ),58 __( 'This will redirect all author names & author pages to the URL specified below.', 'wp-custom-author-url' ), 59 59 ) 60 60 ); … … 63 63 add_settings_field( 64 64 'redirect_url', // ID used to identify the field throughout the theme 65 __( 'Redirect URL', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element65 __( 'Redirect URL', 'wp-custom-author-url' ), // The label to the left of the option interface element 66 66 array( $this, 'redirect_url_callback' ), // The name of the function responsible for rendering the option interface 67 67 'wp_custom_author_url_global_options', // The page on which this option will be displayed 68 68 'global_settings_section', // The name of the section to which this field belongs 69 69 array( // The array of arguments to pass to the callback. In this case, just a description. 70 __( 'This URL will be set as the destination for all Author links.', 'wp-custom-author-url -plugin' ),70 __( 'This URL will be set as the destination for all Author links.', 'wp-custom-author-url' ), 71 71 ) 72 72 ); … … 75 75 add_settings_field( 76 76 'override_individual_authors', // ID used to identify the field throughout the theme 77 __( 'Override Individual Authors?', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element77 __( 'Override Individual Authors?', 'wp-custom-author-url' ), // The label to the left of the option interface element 78 78 array( $this, 'override_individual_authors_callback' ), // The name of the function responsible for rendering the option interface 79 79 'wp_custom_author_url_global_options', // The page on which this option will be displayed 80 80 'global_settings_section', // The name of the section to which this field belongs 81 81 array( // The array of arguments to pass to the callback. In this case, just a description. 82 __( 'This will redirect <strong><em>all</em></strong> authors, regardless of their individual settings. Use with caution.', 'wp-custom-author-url-plugin'),82 sprintf(esc_html__( 'This will redirect %1$sall%2$s authors, regardless of their individual settings. Use with caution.', 'wp-custom-author-url' ),'<strong><u>','</u></strong>'), 83 83 ) 84 84 ); … … 101 101 // This page will be under "Settings" 102 102 add_options_page( 103 'Settings Admin',104 'Custom Author URL',103 __( 'Settings Admin', 'wp-custom-author-url' ), 104 __( 'Custom Author URL', 'wp-custom-author-url' ), 105 105 'manage_options', 106 106 'wp-custom-author-url-settings', … … 118 118 <div class="wrap"> 119 119 120 <h2><?php _e( 'WP Custom Author URL Global Options', 'wp-custom-author-url-plugin' ); ?></h2>120 <h2><?php esc_html_e( 'WP Custom Author URL Global Options', 'wp-custom-author-url' ); ?></h2> 121 121 122 122 <form method="post" action="options.php"> … … 125 125 settings_fields( 'wp_custom_author_url_global_options' ); 126 126 do_settings_sections( 'wp_custom_author_url_global_options' ); 127 submit_button( 'Update Settings');127 submit_button( __( 'Update Settings', 'wp-custom-author-url' ) ); 128 128 129 129 ?> … … 143 143 $options = get_option( 'wp_custom_author_url_global_options' ); 144 144 145 $markup = '<p>These settings will affect <em>all</em> author links on your website. Please use with care. For user-specific settins, see the \'Users\' section.</p>';145 $markup = sprintf(esc_html__( '%1$sThese settings will affect %2$sall%3$s author links on your website. Please use with care. For user-specific settins, see the \'Users\' section.%4$s', 'wp-custom-author-url' ),'<p>','<strong><u>','</u></strong>','</p>'); 146 146 147 147 echo $markup; … … 157 157 public function render_user_profile_fields( $user ) { 158 158 ?> 159 <h3><?php _e( 'Custom Author URL', 'wp-custom-author-url' ); ?></h3>159 <h3><?php esc_html_e( 'Custom Author URL', 'wp-custom-author-url' ); ?></h3> 160 160 161 161 <div class="custom-author-url"> 162 162 <table class="form-table"> 163 163 <tr> 164 <th><label for="use_custom_author_url"><?php _e( 'Use a custom author URL?' ); ?></label></th>164 <th><label for="use_custom_author_url"><?php esc_html_e( 'Use a custom author URL?', 'wp-custom-author-url' ); ?></label></th> 165 165 <td> 166 166 <input type="checkbox" name="use_custom_author_url" id="use_custom_author_url" class="regular-text" <?php echo ( esc_attr( get_the_author_meta( 'use_custom_author_url', $user->ID ) ) ) ? 'checked="checked"' : ''; ?>/> 167 <span class="description"><?php _e( 'This will replace your author page with the link below.' ); ?></span>167 <span class="description"><?php esc_html_e( 'This will replace your author page with the link below.', 'wp-custom-author-url' ); ?></span> 168 168 </td> 169 169 </tr> 170 170 <tr> 171 <th><label for="custom_author_url"><?php _e( 'Custom author URL' ); ?></label></th>171 <th><label for="custom_author_url"><?php esc_html_e( 'Custom Author URL', 'wp-custom-author-url' ); ?></label></th> 172 172 <td> 173 173 <input type="text" name="custom_author_url" id="custom_author_url" placeholder="https://x.com/poodleplugins" value="<?php echo esc_attr( get_the_author_meta( 'custom_author_url', $user->ID ) ); ?>" class="regular-text" /> 174 <p class="description"><?php _e( 'Please enter your custom author URL.' ); ?></p>174 <p class="description"><?php esc_html_e( 'Please enter your custom author URL.', 'wp-custom-author-url' ); ?></p> 175 175 </td> 176 176 </tr> -
wp-custom-author-url/tags/2.1.0/trunk/README.txt
r3117891 r3180196 4 4 Requires at least: 3.0.1 5 5 Requires PHP: 5.6 6 Tested up to: 6. 67 Stable tag: 2. 0.26 Tested up to: 6.7 7 Stable tag: 2.1.0 8 8 License: GPL-3.0+ 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 63 63 == Changelog == 64 64 65 = 2.1.0 = 66 * Localization to zh_TW and related fixes, Thanks to https://wordpress.org/support/users/alexclassroom/ 67 65 68 = 2.0.2 = 66 69 * Remove unnecessary enqueue_scripts call in admin. -
wp-custom-author-url/tags/2.1.0/trunk/includes/class-wp-custom-author-url-settings.php
r3099881 r3180196 51 51 add_settings_field( 52 52 'redirect_all_authors', // ID used to identify the field throughout the theme 53 __( 'Redirect All Author URLs?', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element53 __( 'Redirect All Author URLs?', 'wp-custom-author-url' ), // The label to the left of the option interface element 54 54 array( $this, 'redirect_all_authors_callback' ), // The name of the function responsible for rendering the option interface 55 55 'wp_custom_author_url_global_options', // The page on which this option will be displayed 56 56 'global_settings_section', // The name of the section to which this field belongs 57 57 array( // The array of arguments to pass to the callback. In this case, just a description. 58 __( 'This will redirect all author names & author pages to the URL specified below.', 'wp-custom-author-url -plugin' ),58 __( 'This will redirect all author names & author pages to the URL specified below.', 'wp-custom-author-url' ), 59 59 ) 60 60 ); … … 63 63 add_settings_field( 64 64 'redirect_url', // ID used to identify the field throughout the theme 65 __( 'Redirect URL', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element65 __( 'Redirect URL', 'wp-custom-author-url' ), // The label to the left of the option interface element 66 66 array( $this, 'redirect_url_callback' ), // The name of the function responsible for rendering the option interface 67 67 'wp_custom_author_url_global_options', // The page on which this option will be displayed 68 68 'global_settings_section', // The name of the section to which this field belongs 69 69 array( // The array of arguments to pass to the callback. In this case, just a description. 70 __( 'This URL will be set as the destination for all Author links.', 'wp-custom-author-url -plugin' ),70 __( 'This URL will be set as the destination for all Author links.', 'wp-custom-author-url' ), 71 71 ) 72 72 ); … … 75 75 add_settings_field( 76 76 'override_individual_authors', // ID used to identify the field throughout the theme 77 __( 'Override Individual Authors?', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element77 __( 'Override Individual Authors?', 'wp-custom-author-url' ), // The label to the left of the option interface element 78 78 array( $this, 'override_individual_authors_callback' ), // The name of the function responsible for rendering the option interface 79 79 'wp_custom_author_url_global_options', // The page on which this option will be displayed 80 80 'global_settings_section', // The name of the section to which this field belongs 81 81 array( // The array of arguments to pass to the callback. In this case, just a description. 82 __( 'This will redirect <strong><em>all</em></strong> authors, regardless of their individual settings. Use with caution.', 'wp-custom-author-url-plugin'),82 sprintf(esc_html__( 'This will redirect %1$sall%2$s authors, regardless of their individual settings. Use with caution.', 'wp-custom-author-url' ),'<strong><u>','</u></strong>'), 83 83 ) 84 84 ); … … 101 101 // This page will be under "Settings" 102 102 add_options_page( 103 'Settings Admin',104 'Custom Author URL',103 __( 'Settings Admin', 'wp-custom-author-url' ), 104 __( 'Custom Author URL', 'wp-custom-author-url' ), 105 105 'manage_options', 106 106 'wp-custom-author-url-settings', … … 118 118 <div class="wrap"> 119 119 120 <h2><?php _e( 'WP Custom Author URL Global Options', 'wp-custom-author-url-plugin' ); ?></h2>120 <h2><?php esc_html_e( 'WP Custom Author URL Global Options', 'wp-custom-author-url' ); ?></h2> 121 121 122 122 <form method="post" action="options.php"> … … 125 125 settings_fields( 'wp_custom_author_url_global_options' ); 126 126 do_settings_sections( 'wp_custom_author_url_global_options' ); 127 submit_button( 'Update Settings');127 submit_button( __( 'Update Settings', 'wp-custom-author-url' ) ); 128 128 129 129 ?> … … 143 143 $options = get_option( 'wp_custom_author_url_global_options' ); 144 144 145 $markup = '<p>These settings will affect <em>all</em> author links on your website. Please use with care. For user-specific settins, see the \'Users\' section.</p>';145 $markup = sprintf(esc_html__( '%1$sThese settings will affect %2$sall%3$s author links on your website. Please use with care. For user-specific settins, see the \'Users\' section.%4$s', 'wp-custom-author-url' ),'<p>','<strong><u>','</u></strong>','</p>'); 146 146 147 147 echo $markup; … … 157 157 public function render_user_profile_fields( $user ) { 158 158 ?> 159 <h3><?php _e( 'Custom Author URL', 'wp-custom-author-url' ); ?></h3>159 <h3><?php esc_html_e( 'Custom Author URL', 'wp-custom-author-url' ); ?></h3> 160 160 161 161 <div class="custom-author-url"> 162 162 <table class="form-table"> 163 163 <tr> 164 <th><label for="use_custom_author_url"><?php _e( 'Use a custom author URL?' ); ?></label></th>164 <th><label for="use_custom_author_url"><?php esc_html_e( 'Use a custom author URL?', 'wp-custom-author-url' ); ?></label></th> 165 165 <td> 166 166 <input type="checkbox" name="use_custom_author_url" id="use_custom_author_url" class="regular-text" <?php echo ( esc_attr( get_the_author_meta( 'use_custom_author_url', $user->ID ) ) ) ? 'checked="checked"' : ''; ?>/> 167 <span class="description"><?php _e( 'This will replace your author page with the link below.' ); ?></span>167 <span class="description"><?php esc_html_e( 'This will replace your author page with the link below.', 'wp-custom-author-url' ); ?></span> 168 168 </td> 169 169 </tr> 170 170 <tr> 171 <th><label for="custom_author_url"><?php _e( 'Custom author URL' ); ?></label></th>171 <th><label for="custom_author_url"><?php esc_html_e( 'Custom Author URL', 'wp-custom-author-url' ); ?></label></th> 172 172 <td> 173 173 <input type="text" name="custom_author_url" id="custom_author_url" placeholder="https://x.com/poodleplugins" value="<?php echo esc_attr( get_the_author_meta( 'custom_author_url', $user->ID ) ); ?>" class="regular-text" /> 174 <p class="description"><?php _e( 'Please enter your custom author URL.' ); ?></p>174 <p class="description"><?php esc_html_e( 'Please enter your custom author URL.', 'wp-custom-author-url' ); ?></p> 175 175 </td> 176 176 </tr> -
wp-custom-author-url/trunk/README.txt
r3117891 r3180196 4 4 Requires at least: 3.0.1 5 5 Requires PHP: 5.6 6 Tested up to: 6. 67 Stable tag: 2. 0.26 Tested up to: 6.7 7 Stable tag: 2.1.0 8 8 License: GPL-3.0+ 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 63 63 == Changelog == 64 64 65 = 2.1.0 = 66 * Localization to zh_TW and related fixes, Thanks to https://wordpress.org/support/users/alexclassroom/ 67 65 68 = 2.0.2 = 66 69 * Remove unnecessary enqueue_scripts call in admin. -
wp-custom-author-url/trunk/includes/class-wp-custom-author-url-settings.php
r3099881 r3180196 51 51 add_settings_field( 52 52 'redirect_all_authors', // ID used to identify the field throughout the theme 53 __( 'Redirect All Author URLs?', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element53 __( 'Redirect All Author URLs?', 'wp-custom-author-url' ), // The label to the left of the option interface element 54 54 array( $this, 'redirect_all_authors_callback' ), // The name of the function responsible for rendering the option interface 55 55 'wp_custom_author_url_global_options', // The page on which this option will be displayed 56 56 'global_settings_section', // The name of the section to which this field belongs 57 57 array( // The array of arguments to pass to the callback. In this case, just a description. 58 __( 'This will redirect all author names & author pages to the URL specified below.', 'wp-custom-author-url -plugin' ),58 __( 'This will redirect all author names & author pages to the URL specified below.', 'wp-custom-author-url' ), 59 59 ) 60 60 ); … … 63 63 add_settings_field( 64 64 'redirect_url', // ID used to identify the field throughout the theme 65 __( 'Redirect URL', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element65 __( 'Redirect URL', 'wp-custom-author-url' ), // The label to the left of the option interface element 66 66 array( $this, 'redirect_url_callback' ), // The name of the function responsible for rendering the option interface 67 67 'wp_custom_author_url_global_options', // The page on which this option will be displayed 68 68 'global_settings_section', // The name of the section to which this field belongs 69 69 array( // The array of arguments to pass to the callback. In this case, just a description. 70 __( 'This URL will be set as the destination for all Author links.', 'wp-custom-author-url -plugin' ),70 __( 'This URL will be set as the destination for all Author links.', 'wp-custom-author-url' ), 71 71 ) 72 72 ); … … 75 75 add_settings_field( 76 76 'override_individual_authors', // ID used to identify the field throughout the theme 77 __( 'Override Individual Authors?', 'wp-custom-author-url -plugin' ), // The label to the left of the option interface element77 __( 'Override Individual Authors?', 'wp-custom-author-url' ), // The label to the left of the option interface element 78 78 array( $this, 'override_individual_authors_callback' ), // The name of the function responsible for rendering the option interface 79 79 'wp_custom_author_url_global_options', // The page on which this option will be displayed 80 80 'global_settings_section', // The name of the section to which this field belongs 81 81 array( // The array of arguments to pass to the callback. In this case, just a description. 82 __( 'This will redirect <strong><em>all</em></strong> authors, regardless of their individual settings. Use with caution.', 'wp-custom-author-url-plugin'),82 sprintf(esc_html__( 'This will redirect %1$sall%2$s authors, regardless of their individual settings. Use with caution.', 'wp-custom-author-url' ),'<strong><u>','</u></strong>'), 83 83 ) 84 84 ); … … 101 101 // This page will be under "Settings" 102 102 add_options_page( 103 'Settings Admin',104 'Custom Author URL',103 __( 'Settings Admin', 'wp-custom-author-url' ), 104 __( 'Custom Author URL', 'wp-custom-author-url' ), 105 105 'manage_options', 106 106 'wp-custom-author-url-settings', … … 118 118 <div class="wrap"> 119 119 120 <h2><?php _e( 'WP Custom Author URL Global Options', 'wp-custom-author-url-plugin' ); ?></h2>120 <h2><?php esc_html_e( 'WP Custom Author URL Global Options', 'wp-custom-author-url' ); ?></h2> 121 121 122 122 <form method="post" action="options.php"> … … 125 125 settings_fields( 'wp_custom_author_url_global_options' ); 126 126 do_settings_sections( 'wp_custom_author_url_global_options' ); 127 submit_button( 'Update Settings');127 submit_button( __( 'Update Settings', 'wp-custom-author-url' ) ); 128 128 129 129 ?> … … 143 143 $options = get_option( 'wp_custom_author_url_global_options' ); 144 144 145 $markup = '<p>These settings will affect <em>all</em> author links on your website. Please use with care. For user-specific settins, see the \'Users\' section.</p>';145 $markup = sprintf(esc_html__( '%1$sThese settings will affect %2$sall%3$s author links on your website. Please use with care. For user-specific settins, see the \'Users\' section.%4$s', 'wp-custom-author-url' ),'<p>','<strong><u>','</u></strong>','</p>'); 146 146 147 147 echo $markup; … … 157 157 public function render_user_profile_fields( $user ) { 158 158 ?> 159 <h3><?php _e( 'Custom Author URL', 'wp-custom-author-url' ); ?></h3>159 <h3><?php esc_html_e( 'Custom Author URL', 'wp-custom-author-url' ); ?></h3> 160 160 161 161 <div class="custom-author-url"> 162 162 <table class="form-table"> 163 163 <tr> 164 <th><label for="use_custom_author_url"><?php _e( 'Use a custom author URL?' ); ?></label></th>164 <th><label for="use_custom_author_url"><?php esc_html_e( 'Use a custom author URL?', 'wp-custom-author-url' ); ?></label></th> 165 165 <td> 166 166 <input type="checkbox" name="use_custom_author_url" id="use_custom_author_url" class="regular-text" <?php echo ( esc_attr( get_the_author_meta( 'use_custom_author_url', $user->ID ) ) ) ? 'checked="checked"' : ''; ?>/> 167 <span class="description"><?php _e( 'This will replace your author page with the link below.' ); ?></span>167 <span class="description"><?php esc_html_e( 'This will replace your author page with the link below.', 'wp-custom-author-url' ); ?></span> 168 168 </td> 169 169 </tr> 170 170 <tr> 171 <th><label for="custom_author_url"><?php _e( 'Custom author URL' ); ?></label></th>171 <th><label for="custom_author_url"><?php esc_html_e( 'Custom Author URL', 'wp-custom-author-url' ); ?></label></th> 172 172 <td> 173 173 <input type="text" name="custom_author_url" id="custom_author_url" placeholder="https://x.com/poodleplugins" value="<?php echo esc_attr( get_the_author_meta( 'custom_author_url', $user->ID ) ); ?>" class="regular-text" /> 174 <p class="description"><?php _e( 'Please enter your custom author URL.' ); ?></p>174 <p class="description"><?php esc_html_e( 'Please enter your custom author URL.', 'wp-custom-author-url' ); ?></p> 175 175 </td> 176 176 </tr>
Note: See TracChangeset
for help on using the changeset viewer.