Changeset 2986717
- Timestamp:
- 10/31/2023 10:18:05 AM (2 years ago)
- Location:
- reword/trunk
- Files:
-
- 4 edited
-
admin/js/reword-settings.js (modified) (1 diff)
-
admin/php/reword-settings.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
reword.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
reword/trunk/admin/js/reword-settings.js
r1854481 r2986717 1 1 /* 2 2 * Reword admin settings page script. 3 *4 * Handles reports page access level description toggle5 3 */ 6 7 /**8 * Reports page access level select menu onchange callback.9 *10 * Toggles option description for Admin and Contributor.11 */12 ( rewordOnSelectAccess = function() {13 var accessSelect = document.getElementById( 'reword_access_cap' );14 if ( null !== accessSelect ) {15 if ( 'edit_posts' === accessSelect.value ) {16 // Contributor access17 document.getElementById( 'reword_access_contributor' ).style.display = 'block';18 document.getElementById( 'reword_access_admin' ).style.display = 'none';19 } else {20 // Admin access21 document.getElementById( 'reword_access_contributor' ).style.display = 'none';22 document.getElementById( 'reword_access_admin' ).style.display = 'block';23 }24 }25 } )();26 4 27 5 /** -
reword/trunk/admin/php/reword-settings.php
r1857904 r2986717 132 132 <fieldset> 133 133 <label> 134 <select id="reword_access_cap" name="reword_access_cap" onchange="rewordOnSelectAccess()">134 <select id="reword_access_cap" name="reword_access_cap"> 135 135 <?php $reword_access_cap = get_option( 'reword_access_cap' ) ?> 136 <option value="manage_options" <?php echo ( $reword_access_cap === 'manage_options' ? 'selected' : '' ); ?>>Administrator</option> 137 <option value="edit_others_posts" <?php echo ( $reword_access_cap === 'edit_others_posts' ? 'selected' : '' ); ?>>Editor</option> 138 <option value="edit_published_posts" <?php echo ( $reword_access_cap === 'edit_published_posts' ? 'selected' : '' ); ?>>Author</option> 136 139 <option value="edit_posts" <?php echo ( $reword_access_cap === 'edit_posts' ? 'selected' : '' ); ?>>Contributor</option> 137 <option value="manage_options" <?php echo ( $reword_access_cap === 'manage_options' ? 'selected' : '' ); ?>>Administrator</option>138 140 </select> 139 141 </label> 140 <p id="reword_access_contributor" class="description" style="display: none"> 141 Users that can edit content can access ReWord Reports Center. 142 </p> 143 <p id="reword_access_admin" class="description" style="display: none"> 144 Only Admins can access ReWord Reports Center. 142 <p class="description"> 143 Users with this role can access ReWord reports page. 145 144 </p> 146 145 </fieldset> -
reword/trunk/readme.txt
r2985589 r2986717 21 21 22 22 == Changelog == 23 = 2.2 = 24 * Feature request: Add Editor and Author roles to reports access level settings 25 * Set reports access level default role to Administrator 26 23 27 = 2.1 = 24 28 * Bug fix: Failure to delete ReWord plugin in PHP 8.2 -
reword/trunk/reword.php
r2985589 r2986717 4 4 * Plugin URI: http://reword.000webhostapp.com/wordpress 5 5 * Description: This plugin allows readers to suggest fixes for content mistakes in your site. Intuitive frontend UI lets users report mistakes and send them to Administrator. Just mark mistake text, click on “R” icon, add your fix and send it. The reports admin page displays all reported mistakes, and lets admin fix them, or ignore them. Admin can also set the number of alerts before showing a report, to ensure accurate reports and real issues detection. 6 * Version: 2. 16 * Version: 2.2 7 7 * Author: TiomKing 8 8 * Author URI: https://profiles.wordpress.org/tiomking … … 73 73 'reword_reports_min' => 1, 74 74 'reword_email_new' => array(), 75 'reword_access_cap' => ' edit_posts',75 'reword_access_cap' => 'manage_options', 76 76 'reword_send_stats' => 'false', 77 77 'reword_plugin_version' => REWORD_PLUGIN_VERSION,
Note: See TracChangeset
for help on using the changeset viewer.