Plugin Directory

Changeset 3454512 for code-snippets

Timestamp:
02/05/2026 11:02:37 AM (4 weeks ago)
Author:
codesnippetspro
Message:

Version v3.9.5

Location:
code-snippets/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code-snippets/trunk/CHANGELOG.md

    r3441225 r3454512  
    11# Changelog
     2
     3
     4
     5
     6
     7
     8
     9
    210
    311## [3.9.4] (2026-01-14)
  • code-snippets/trunk/code-snippets.php

    r3441225 r3454512  
    99 * License URI:  license.txt
    1010 * Text Domain:  code-snippets
    11  * Version:      3.9.4
     11 * Version:      3.9.
    1212 * Requires PHP: 7.4
    1313 * Requires at least: 5.0
    1414 *
    15  * @version   3.9.4
     15 * @version   3.9.
    1616 * @package   Code_Snippets
    1717 * @author    Shea Bunge <shea@codesnippets.pro>
     
    3838     * @const string
    3939     */
    40     define( 'CODE_SNIPPETS_VERSION', '3.9.4' );
     40    define( 'CODE_SNIPPETS_VERSION', '3.9.' );
    4141
    4242    /**
  • code-snippets/trunk/php/cloud/class-cloud-search-list-table.php

    r3397635 r3454512  
    102102
    103103        // Check request is coming from the cloud search page.
    104         if ( isset( $_REQUEST['type'] ) && 'cloud_search' === $_REQUEST['type'] ) {
    105                 if ( isset( $_REQUEST['action'], $_REQUEST['snippet'], $_REQUEST['source'] ) ) {
    106                     cloud_lts_process_download_action(
    107                         sanitize_key( wp_unslash( $_REQUEST['action'] ) ),
    108                         sanitize_key( wp_unslash( $_REQUEST['source'] ) ),
    109                         sanitize_key( wp_unslash( $_REQUEST['snippet'] ) ),
    110                     );
    111                 }
    112         }
     104        if ( ! isset( $_REQUEST['type'] ) || 'cloud_search' !== sanitize_key( wp_unslash( $_REQUEST['type'] ) ) ) {
     105            return;
     106        }
     107
     108        if ( ! isset( $_REQUEST['action'], $_REQUEST['snippet'], $_REQUEST['source'] ) ) {
     109            return;
     110        }
     111
     112        $action = sanitize_key( wp_unslash( $_REQUEST['action'] ) );
     113        $source = sanitize_key( wp_unslash( $_REQUEST['source'] ) );
     114        $snippet_id = absint( wp_unslash( $_REQUEST['snippet'] ) );
     115
     116        if ( ! in_array( $action, [ 'download', 'update' ], true ) ) {
     117            return;
     118        }
     119
     120        if ( ! $snippet_id ) {
     121            return;
     122        }
     123
     124        check_admin_referer( cloud_lts_get_snippet_action_nonce_action( $action, $snippet_id, $source ) );
     125
     126        cloud_lts_process_download_action(
     127            $action,
     128            $source,
     129            (string) $snippet_id,
     130        );
    113131    }
    114132
  • code-snippets/trunk/php/cloud/list-table-shared-ops.php

    r3397635 r3454512  
    99
    1010use function Code_Snippets\code_snippets;
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
    1124
    1225/**
     
    8396    $is_licensed = code_snippets()->licensing->is_licensed();
    8497    $download = $is_licensed || ! in_array( $lang, [ 'css', 'js' ], true );
     98
    8599
    86100    if ( $link ) {
    87101        if ( $is_licensed && $link->update_available ) {
    88             $update_url = add_query_arg(
    89                 [
    90                     'action'  => 'update',
    91                     'snippet' => $cloud_snippet->id,
    92                     'source'  => $source,
    93                 ]
     102            $update_url = wp_nonce_url(
     103                add_query_arg(
     104                    [
     105                        'action'  => 'update',
     106                        'snippet' => $snippet_id,
     107                        'source'  => $source,
     108                    ]
     109                ),
     110                cloud_lts_get_snippet_action_nonce_action( 'update', $snippet_id, $source )
    94111            );
    95112            return sprintf(
     
    110127            $download_query = [
    111128                'action'  => 'download',
    112                 'snippet' => $cloud_snippet->id,
     129                'snippet' => $id,
    113130                'source'  => $source,
    114131            ];
     
    119136            }
    120137
    121             $download_url = add_query_arg( $download_query );
     138            $download_url = wp_nonce_url(
     139                add_query_arg( $download_query ),
     140                cloud_lts_get_snippet_action_nonce_action( 'download', $snippet_id, $source )
     141            );
    122142
    123143        $download_button = sprintf(
  • code-snippets/trunk/readme.txt

    r3441225 r3454512  
    55License: GPL-2.0-or-later
    66License URI: license.txt
    7 Stable tag: 3.9.4
    8 Tested up to: 6.8
     7Stable tag: 3.9.
     8Tested up to: 6.
    99
    1010An easy, clean and simple way to enhance your site with code snippets.
     
    104104
    105105== Changelog ==
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
    106116
    107117= 3.9.4 (2026-01-14) =
  • code-snippets/trunk/vendor/composer/installed.php

    r3441225 r3454512  
    22    'root' => array(
    33        'name' => 'codesnippetspro/code-snippets',
    4         'pretty_version' => 'v3.9.4',
    5         'version' => '3.9.4.0',
    6         'reference' => '8ee0c5cd40988c6ddfdba4d8fb67523296d84d1e',
     4        'pretty_version' => 'v3.9.',
     5        'version' => '3.9..0',
     6        'reference' => 'e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'codesnippetspro/code-snippets' => array(
    14             'pretty_version' => 'v3.9.4',
    15             'version' => '3.9.4.0',
    16             'reference' => '8ee0c5cd40988c6ddfdba4d8fb67523296d84d1e',
     14            'pretty_version' => 'v3.9.',
     15            'version' => '3.9..0',
     16            'reference' => 'e',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.