Plugin Directory

Changeset 3328412


Ignore:
Timestamp:
07/15/2025 05:27:34 PM (9 months ago)
Author:
plance
Message:

change: labels; fix: security

Location:
my-text-shortcodes/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • my-text-shortcodes/trunk/includes/class-admin-menu.php

    r3327046 r3328412  
    3333    public function admin_menu() {
    3434        $hook_list = add_menu_page(
    35             __( 'List shortcodes', 'my-text-shortcodes' ),
    36             __( 'My shortcodes', 'my-text-shortcodes' ),
     35            __( 'List Shortcodes', 'my-text-shortcodes' ),
     36            __( 'My Shortcodes', 'my-text-shortcodes' ),
    3737            'manage_options',
    3838            Controller_Table::SLUG,
     
    4242        add_submenu_page(
    4343            Controller_Table::SLUG,
    44             __( 'List shortcodes', 'my-text-shortcodes' ),
    45             __( 'List shortcodes', 'my-text-shortcodes' ),
     44            __( 'List Shortcodes', 'my-text-shortcodes' ),
     45            __( 'List Shortcodes', 'my-text-shortcodes' ),
    4646            'manage_options',
    4747            Controller_Table::SLUG,
     
    5151        $hook_form = add_submenu_page(
    5252            Controller_Table::SLUG,
    53             __( 'Creating shortcode', 'my-text-shortcodes' ),
    54             __( 'Create shortcode', 'my-text-shortcodes' ),
     53            __( 'Creating Shortcode', 'my-text-shortcodes' ),
     54            __( 'Create Shortcode', 'my-text-shortcodes' ),
    5555            'manage_options',
    5656            Controller_Form::SLUG,
  • my-text-shortcodes/trunk/includes/class-controller-form.php

    r3327046 r3328412  
    4747
    4848        if ( $is_post_request ) {
     49            $input_wpnonce = filter_input( INPUT_POST, '_wpnonce', FILTER_CALLBACK, array( 'options' => 'sanitize_text_field' ) );
     50            if ( ! wp_verify_nonce( $input_wpnonce, SECURITY ) ) {
     51                Flash::redirect( add_query_arg( array( 'page' => Controller_Table::SLUG ), admin_url( 'admin.php' ) ), __( 'Wrong `wpnonce` value!', 'my-maps' ), false );
     52            }
     53
    4954            $input = filter_input( INPUT_POST, 'shortcode', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
    5055            $input = filter_var_array(
     
    147152
    148153        if ( $shortcode_id ) {
    149             $form_title                 = __( 'Editing shortcode', 'my-text-shortcodes' );
     154            $form_title                 = __( 'Editing Shortcode', 'my-text-shortcodes' );
    150155            $query_args['shortcode_id'] = $shortcode_id;
    151156        } else {
    152             $form_title = __( 'Creating shortcode', 'my-text-shortcodes' );
     157            $form_title = __( 'Creating Shortcode', 'my-text-shortcodes' );
    153158        }
    154159
  • my-text-shortcodes/trunk/includes/class-controller-table.php

    r3327046 r3328412  
    110110        <div class="wrap">
    111111            <h2>
    112                 <?php esc_html_e( 'List shortcodes', 'my-text-shortcodes' ); ?>
     112                <?php esc_html_e( 'List Shortcodes', 'my-text-shortcodes' ); ?>
    113113                <a href="<?php echo esc_url( add_query_arg( array( 'page' => Controller_Form::SLUG ) ) ); ?>" class="page-title-action">
    114                     <?php esc_html_e( 'Add shortcode', 'my-text-shortcodes' ); ?>
     114                    <?php esc_html_e( 'Add Shortcode', 'my-text-shortcodes' ); ?>
    115115                </a>
    116116            </h2>
  • my-text-shortcodes/trunk/readme.txt

    r3327046 r3328412  
    2929
    3030== Changelog ==
     31= 1.1.1 =
     32* Change labels.
     33* Fix security.
     34
    3135= 1.1.0 =
    3236* Complete code refactoring.
Note: See TracChangeset for help on using the changeset viewer.