Plugin Directory

Changeset 3038306


Ignore:
Timestamp:
02/20/2024 06:45:59 AM (2 years ago)
Author:
Desertsnowman
Message:

update missing methods v2.0.9

Location:
plugin-groups/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • plugin-groups/trunk/classes/class-bulk-actions.php

    r2601515 r3038306  
    6666        switch ( $action ) {
    6767            case 'add-to-group':
    68                 $selected_group = filter_input( INPUT_POST, 'group_id', FILTER_SANITIZE_STRING );
     68                $selected_group = Utils::get_sanitized_text( INPUT_POST, 'group_id' );
    6969                if ( '__new' === $selected_group ) {
    7070                    // Create a new group.
    71                     $new_group_name = filter_input( INPUT_POST, 'new_group_name', FILTER_SANITIZE_STRING );
     71                    $new_group_name = Utils::get_sanitized_text( INPUT_POST, 'new_group_name' );
    7272                    $succeed        = $this->plugin_groups->create_group( $new_group_name, $plugins );
    7373                    if ( $succeed ) {
     
    105105        $current_group = $this->plugin_groups->get_current_group();
    106106        if ( $current_group ) {
     107            // Translators: placeholder is group name.
    107108            $actions['remove-from-group'] = sprintf( __( 'Remove from %s', 'plugin-groups' ), $current_group['name'] );
    108109        }
  • plugin-groups/trunk/classes/class-utils.php

    r2593591 r3038306  
    127127        return uniqid( 'nd' );
    128128    }
     129
     130    /**
     131     * Get a sanitized input text field.
     132     *
     133     * @param int    $type The type to get.
     134     * @param string $var  The value to get.
     135     *
     136     * @return mixed
     137     */
     138    public static function get_sanitized_text( $type, $var ) {
     139        return filter_input( $type, $var, FILTER_CALLBACK, array( 'options' => 'sanitize_text_field' ) );
     140    }
     141
    129142}
  • plugin-groups/trunk/plugincore.php

    r3036754 r3038306  
    44 * Plugin URI: https://cramer.co.za
    55 * Description: Organize Plugins in groups
    6  * Version: 2.0.8
     6 * Version: 2.0.9
    77 * Author: David Cramer
    88 * Author URI: https://cramer.co.za
  • plugin-groups/trunk/readme.txt

    r3036761 r3038306  
    55Requires at least: 5.3
    66Tested up to: 6.4.3
    7 Stable tag: 2.0.8
     7Stable tag: 2.0.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040
    4141== Changelog ==
     42
     43= 2.0.9 =
     44- Fixed missing class.
    4245
    4346= 2.0.8 =
Note: See TracChangeset for help on using the changeset viewer.