Changeset 3536402
- Timestamp:
- 05/18/2026 11:39:43 PM (9 days ago)
- Location:
- pending-status
- Files:
-
- 14 added
- 5 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/assets (added)
-
tags/1.1.0/assets/admin-style.css (added)
-
tags/1.1.0/assets/room34-logo-on-white.svg (added)
-
tags/1.1.0/class-pending-status.php (added)
-
tags/1.1.0/functions.php (added)
-
tags/1.1.0/i18n (added)
-
tags/1.1.0/i18n/languages (added)
-
tags/1.1.0/i18n/languages/pending-status.pot (added)
-
tags/1.1.0/pending-status.php (added)
-
tags/1.1.0/readme.txt (added)
-
tags/1.1.0/templates (added)
-
tags/1.1.0/templates/admin (added)
-
tags/1.1.0/templates/admin/r34ps-admin.php (added)
-
trunk/class-pending-status.php (modified) (4 diffs)
-
trunk/functions.php (modified) (4 diffs)
-
trunk/pending-status.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/admin/r34ps-admin.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pending-status/trunk/class-pending-status.php
r3281184 r3536402 1 1 <?php 2 3 // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment 2 4 3 5 // Don't load directly … … 54 56 public function admin_page_callback() { 55 57 // Update settings 56 if (isset($_POST['r34ps-nonce']) && wp_verify_nonce( $_POST['r34ps-nonce'], 'r34ps-admin')) {58 if (isset($_POST['r34ps-nonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['r34ps-nonce'])), 'r34ps-admin')) { 57 59 58 60 if (!empty($_POST['r34ps_notification_recipients'])) { 61 // phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash 62 // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 59 63 update_option('r34ps_notification_recipients', filter_var_array($_POST['r34ps_notification_recipients'], FILTER_SANITIZE_EMAIL)); 64 // phpcs:enable WordPress.Security.ValidatedSanitizedInput.MissingUnslash 65 // phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 60 66 } 61 67 else { … … 78 84 79 85 // Display admin notice 80 echo '<div class="notice notice-success"><p>' . __('Settings updated.', 'pending-status') . '</p></div>';86 echo '<div class="notice notice-success"><p>' . esc_html__('Settings updated.', 'pending-status') . '</p></div>'; 81 87 } 82 88 … … 96 102 97 103 public function email_default_strings() { 98 $this->default_subject = sprintf(__('A new post is pending review on %1$s', 'pending- review'), get_bloginfo('name'));104 $this->default_subject = sprintf(__('A new post is pending review on %1$s', 'pending-status'), get_bloginfo('name')); 99 105 $this->default_message = __('A post on your website has been set to "pending review." You can review the post at the link below.', 'pending-status'); 100 106 } -
pending-status/trunk/functions.php
r2687787 r3536402 1 1 <?php 2 3 // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment 2 4 3 5 // Don't load directly … … 13 15 $r34ps_status = array(); 14 16 foreach ((array)$post_types as $post_type) { 15 $sql = 'SELECT COUNT(`ID`) as count FROM `' . $wpdb->posts . '` ' . 16 'WHERE `post_type` = "' . esc_sql($post_type->name) . '" ' . 17 'AND `post_status` = "pending"'; 18 $r34ps_results = $wpdb->get_results($sql); 19 $count = intval($r34ps_results[0]->count); 17 $pending_posts = get_posts(array( 18 'fields' => 'ids', 19 'post_status' => 'pending', 20 'post_type' => $post_type->name, 21 'posts_per_page' => -1, 22 )); 23 $count = count($pending_posts); 20 24 if ($count > 0) { 21 25 $r34ps_status[] = array( … … 28 32 } 29 33 if (!empty($r34ps_status)) { 30 echo '<p>' . __('You have one or more posts pending review.', 'pending-status') . '</p><table class="r34ps-table"><tbody>';34 echo '<p>' . esc_html__('You have one or more posts pending review.', 'pending-status') . '</p><table class="r34ps-table"><tbody>'; 31 35 foreach ((array)$r34ps_status as $item) { 32 36 echo '<tr><td><strong>' . wp_kses_post($item['label']) . ': </strong></td><td>' . intval($item['count']); … … 39 43 } 40 44 else { 41 echo '<p>' . __('You currently have no posts pending review.', 'pending-status') . '</p>';45 echo '<p>' . esc_html__('You currently have no posts pending review.', 'pending-status') . '</p>'; 42 46 } 43 47 ?> -
pending-status/trunk/pending-status.php
r3281184 r3536402 4 4 Plugin URI: https://room34.com 5 5 Description: Get notified when your site has posts pending review. 6 Version: 1. 0.46 Version: 1.1.0 7 7 Author: Room 34 Creative Services, LLC 8 8 Author URI: http://room34.com … … 27 27 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 28 28 */ 29 30 // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment 29 31 30 32 … … 71 73 $notices = get_option('r34ps_deferred_admin_notices', array()); 72 74 $notices[] = array( 73 'content' => '<p>' . sprintf(__('Thank you for installing %1$sPending Status%2$s. If you would like to set up email notifications for pending posts, please visit the %3$sSettings%4$s page.' ), '<strong>', '</strong>', '<a href="' . admin_url('options-general.php?page=pending-status') . '"><strong>', '</strong></a>') . '</p>',75 'content' => '<p>' . sprintf(__('Thank you for installing %1$sPending Status%2$s. If you would like to set up email notifications for pending posts, please visit the %3$sSettings%4$s page.', 'pending-status'), '<strong>', '</strong>', '<a href="' . admin_url('options-general.php?page=pending-status') . '"><strong>', '</strong></a>') . '</p>', 74 76 'status' => 'info' 75 77 ); -
pending-status/trunk/readme.txt
r3281184 r3536402 5 5 Requires at least: 4.9 6 6 Requires PHP: 7.0.0 7 Tested up to: 6.88 Stable tag: 1. 0.47 Tested up to: 7.0 8 Stable tag: 1.1.0 9 9 License: GPLv2 10 10 … … 37 37 == Changelog == 38 38 39 = 1.1.0 - 2026.05.18 = 40 41 * Refactored `r34ps_dashboard_widget()` function to use `get_posts()` instead of direct SQL query. 42 * Additional code refactoring to pass [Plugin Check](https://wordpress.org/plugins/plugin-check/) tests. 43 * Bumped "tested up to" to 7.0. 44 39 45 = 1.0.4 - 2025.04.24 = 40 46 -
pending-status/trunk/templates/admin/r34ps-admin.php
r3281184 r3536402 1 1 <?php 2 // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment 3 2 4 // Don't load directly 3 5 if (!defined('ABSPATH')) { exit; } … … 8 10 9 11 <div class="wrap r34ps"> 10 <h2><?php echo get_admin_page_title(); ?></h2>12 <h2><?php echo wp_kses_post(get_admin_page_title()); ?></h2> 11 13 12 14 <div class="metabox-holder columns-2"> … … 23 25 ?> 24 26 25 <h3><?php _e('Email Notification Recipients', 'pending-status'); ?></h3>27 <h3><?php esc_html_e('Email Notification Recipients', 'pending-status'); ?></h3> 26 28 27 <p><?php _e('Check the box next to the name of each administrator/editor you would like to receive an email notification when a post has been set to "pending review." Note: Your site must be properly configured to send emails.', 'pending-status'); ?></p>29 <p><?php esc_html_e('Check the box next to the name of each administrator/editor you would like to receive an email notification when a post has been set to "pending review." Note: Your site must be properly configured to send emails.', 'pending-status'); ?></p> 28 30 29 31 <table class="form-table"><tbody> 30 32 <tr class="r34ps-table-header-row"> 31 33 <th style="width: 10%;"></th> 32 <th style="width: 30%;"><?php _e('Name', 'pending-status'); ?></th>33 <th style="width: 30%;"><?php _e('Email', 'pending-status'); ?></th>34 <th style="width: 30%;"><?php _e('Role', 'pending-status'); ?></th>34 <th style="width: 30%;"><?php esc_html_e('Name', 'pending-status'); ?></th> 35 <th style="width: 30%;"><?php esc_html_e('Email', 'pending-status'); ?></th> 36 <th style="width: 30%;"><?php esc_html_e('Role', 'pending-status'); ?></th> 35 37 </tr> 36 38 <?php 39 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound 37 40 foreach ((array)$admins_and_editors as $user) { 38 41 ?> … … 48 51 </tbody></table> 49 52 50 <h3><?php _e('Email Notification Message', 'pending-status'); ?></h3>53 <h3><?php esc_html_e('Email Notification Message', 'pending-status'); ?></h3> 51 54 52 <p><?php _e('Customize the message administrators and editors will receive. The URL to review the post will automatically be added to the end of the message.', 'pending-status'); ?></p>55 <p><?php esc_html_e('Customize the message administrators and editors will receive. The URL to review the post will automatically be added to the end of the message.', 'pending-status'); ?></p> 53 56 54 57 <table class="form-table"><tbody> 55 58 <tr> 56 <td><strong><?php _e('Subject:', 'pending-status'); ?></strong></td>59 <td><strong><?php esc_html_e('Subject:', 'pending-status'); ?></strong></td> 57 60 <td><input type="text" style="width: 100%;" name="r34ps_notification_subject" value="<?php echo esc_attr($r34ps_notification_subject); ?>" /></td> 58 61 </tr> 59 62 <tr> 60 <td><strong><?php _e('Message:', 'pending-status'); ?></strong></td>63 <td><strong><?php esc_html_e('Message:', 'pending-status'); ?></strong></td> 61 64 <td><textarea name="r34ps_notification_message" style="width: 100%;"><?php echo esc_textarea(html_entity_decode($r34ps_notification_message)); ?></textarea></td> 62 65 </tr> … … 79 82 <div class="postbox"> 80 83 81 <h3 class="hndle"><span><?php _e('Pending Status Support', 'pending-status'); ?></span></h3>84 <h3 class="hndle"><span><?php esc_html_e('Pending Status Support', 'pending-status'); ?></span></h3> 82 85 83 86 <div class="inside"> 84 87 85 <p><?php echo sprintf( __('For support with the %1$s plugin, please use the %2$sWordPress Support Forums%3$s or email %4$s.', 'pending-status'), '<strong>Pending Status</strong>', '<a href="https://wordpress.org/support/plugin/pending-status" target="_blank">', '</a>', '<a href="mailto:support@room34.com">support@room34.com</a>'); ?></p>88 <p><?php echo sprintf(esc_html__('For support with the %1$s plugin, please use the %2$sWordPress Support Forums%3$s or email %4$s.', 'pending-status'), '<strong>Pending Status</strong>', '<a href="https://wordpress.org/support/plugin/pending-status" target="_blank">', '</a>', '<a href="mailto:support@room34.com">support@room34.com</a>'); ?></p> 86 89 87 90 </div> … … 95 98 <div class="inside"> 96 99 97 <a href="https://room34.com/about/payments/?type=WordPress+Plugin&plugin=Pending+Status&amt=9" target="_blank"><img src="<?php echo dirname(dirname(plugin_dir_url(__FILE__))); ?>/assets/room34-logo-on-white.svg" alt="Room 34 Creative Services" style="display: block; height: auto; margin: 0 auto 0.5em auto; width: 200px;" /></a>100 <a href="https://room34.com/about/payments/?type=WordPress+Plugin&plugin=Pending+Status&amt=9" target="_blank"><img src="<?php echo esc_url(dirname(dirname(plugin_dir_url(__FILE__)))); ?>/assets/room34-logo-on-white.svg" alt="Room 34 Creative Services" style="display: block; height: auto; margin: 0 auto 0.5em auto; width: 200px;" /></a> 98 101 99 <p><?php _e('This plugin is free to use. However, if you find it to be of value, we welcome your donation (suggested amount: USD $9), to help fund future development.', 'pending-status'); ?></p>102 <p><?php esc_html_e('This plugin is free to use. However, if you find it to be of value, we welcome your donation (suggested amount: USD $9), to help fund future development.', 'pending-status'); ?></p> 100 103 101 <p><a href="https://room34.com/about/payments/?type=WordPress+Plugin&plugin=Pending+Status&amt=9" target="_blank" class="button"><?php _e('Make a Donation', 'pending-status'); ?></a></p>104 <p><a href="https://room34.com/about/payments/?type=WordPress+Plugin&plugin=Pending+Status&amt=9" target="_blank" class="button"><?php esc_html_e('Make a Donation', 'pending-status'); ?></a></p> 102 105 103 106 </div>
Note: See TracChangeset
for help on using the changeset viewer.