Plugin Directory

Changeset 2986717


Ignore:
Timestamp:
10/31/2023 10:18:05 AM (2 years ago)
Author:
tiomking
Message:

Version 2.2

  • Add Editor and Author roles to reports access level settings
  • Set reports access level default role to Administrator
Location:
reword/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • reword/trunk/admin/js/reword-settings.js

    r1854481 r2986717  
    11/*
    22 * Reword admin settings page script.
    3  *
    4  * Handles reports page access level description toggle
    53 */
    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 access
    17             document.getElementById( 'reword_access_contributor' ).style.display = 'block';
    18             document.getElementById( 'reword_access_admin' ).style.display = 'none';
    19         } else {
    20             // Admin access
    21             document.getElementById( 'reword_access_contributor' ).style.display = 'none';
    22             document.getElementById( 'reword_access_admin' ).style.display = 'block';
    23         }
    24     }
    25 } )();
    264
    275/**
  • reword/trunk/admin/php/reword-settings.php

    r1857904 r2986717  
    132132                        <fieldset>
    133133                            <label>
    134                                 <select id="reword_access_cap" name="reword_access_cap" onchange="rewordOnSelectAccess()">
     134                                <select id="reword_access_cap" name="reword_access_cap">
    135135                                    <?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>
    136139                                    <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>
    138140                                </select>
    139141                            </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.
    145144                            </p>
    146145                        </fieldset>
  • reword/trunk/readme.txt

    r2985589 r2986717  
    2121
    2222== 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
    2327= 2.1 =
    2428* Bug fix: Failure to delete ReWord plugin in PHP 8.2
  • reword/trunk/reword.php

    r2985589 r2986717  
    44 * Plugin URI:   http://reword.000webhostapp.com/wordpress
    55 * 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.1
     6 * Version:      2.2
    77 * Author:       TiomKing
    88 * Author URI:   https://profiles.wordpress.org/tiomking
     
    7373    'reword_reports_min'    => 1,
    7474    'reword_email_new'      => array(),
    75     'reword_access_cap'     => 'edit_posts',
     75    'reword_access_cap'     => 'manage_options',
    7676    'reword_send_stats'     => 'false',
    7777    'reword_plugin_version' => REWORD_PLUGIN_VERSION,
Note: See TracChangeset for help on using the changeset viewer.