Plugin Directory

Changeset 3486796


Ignore:
Timestamp:
03/19/2026 07:41:40 PM (2 weeks ago)
Author:
rstake
Message:

Version 1.4.20: Fix author header, add Tested up to, guard constants, suppress template variable warnings, add REST API comments

Location:
sdaweb-channels-for-youtube/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • sdaweb-channels-for-youtube/trunk/admin/views/channel-edit.php

    r3474789 r3486796  
    33    exit;
    44}
     5// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    56
    67// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Admin page routing, no data modification.
  • sdaweb-channels-for-youtube/trunk/admin/views/channel-list.php

    r3474789 r3486796  
    33    exit;
    44}
     5// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    56
    67$list_table = new SDAWCHFO_Channel_List_Table();
  • sdaweb-channels-for-youtube/trunk/admin/views/dashboard.php

    r3485029 r3486796  
    33    exit;
    44}
     5// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    56
    67$channel_count = SDAWCHFO_Channel_Manager::count();
  • sdaweb-channels-for-youtube/trunk/admin/views/settings-page.php

    r3477428 r3486796  
    33    exit;
    44}
     5// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    56?>
    67<div class="wrap sdawchfo-settings">
  • sdaweb-channels-for-youtube/trunk/blocks/youtube-channel/block.json

    r3485052 r3486796  
    33    "apiVersion": 3,
    44    "name": "sdawchfo/youtube-channel",
    5     "version": "1.4.19",
     5    "version": "1.4.20",
    66    "title": "YouTube Channel",
    77    "category": "embed",
  • sdaweb-channels-for-youtube/trunk/blocks/youtube-channel/render.php

    r3485052 r3486796  
    1010    exit;
    1111}
     12// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    1213
    1314$channel_ids = $attributes['channelIds'] ?? array();
  • sdaweb-channels-for-youtube/trunk/includes/class-rest-api.php

    r3474789 r3486796  
    1313
    1414    public static function register_routes() {
    15         // GET /sdawchfo/v1/channels — list all channels (public).
     15        // GET /sdawchfo/v1/channels — list all channels (public, read-only).
    1616        register_rest_route( self::REST_NAMESPACE, '/channels', array(
    1717            'methods'             => WP_REST_Server::READABLE,
    1818            'callback'            => array( __CLASS__, 'get_channels' ),
    19             'permission_callback' => '__return_true',
    20         ) );
    21 
    22         // GET /sdawchfo/v1/videos — query videos (public).
     19            'permission_callback' => '__return_true', // Public read-only endpoint — serves cached channel data, no data modification
     20        ) );
     21
     22        // GET /sdawchfo/v1/videos — query videos (public, read-only).
    2323        register_rest_route( self::REST_NAMESPACE, '/videos', array(
    2424            'methods'             => WP_REST_Server::READABLE,
    2525            'callback'            => array( __CLASS__, 'get_videos' ),
    26             'permission_callback' => '__return_true',
     26            'permission_callback' => '__return_true', // Public read-only endpoint — serves cached video data, no data modification
    2727            'args'                => array(
    2828                'channel_id' => array(
  • sdaweb-channels-for-youtube/trunk/public/views/channel-header.php

    r3485035 r3486796  
    1111    exit;
    1212}
     13// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    1314
    1415$channel = $data['channel'];
  • sdaweb-channels-for-youtube/trunk/public/views/grid.php

    r3485035 r3486796  
    1111    exit;
    1212}
     13// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    1314
    1415$videos = isset( $data['videos'] ) ? $data['videos'] : array();
  • sdaweb-channels-for-youtube/trunk/public/views/lightbox.php

    r3474789 r3486796  
    77    exit;
    88}
     9// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    910
    1011// Only render lightbox once per page.
  • sdaweb-channels-for-youtube/trunk/public/views/slider.php

    r3485035 r3486796  
    1111    exit;
    1212}
     13// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    1314
    1415$videos = isset( $data['videos'] ) ? $data['videos'] : array();
  • sdaweb-channels-for-youtube/trunk/public/views/tabs.php

    r3485035 r3486796  
    1212    exit;
    1313}
     14// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    1415
    1516$channels   = isset( $data['channels'] ) ? $data['channels'] : array();
  • sdaweb-channels-for-youtube/trunk/public/views/video-card.php

    r3485035 r3486796  
    1313    exit;
    1414}
     15// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template variables set by renderer
    1516
    1617$video         = $data['video'];
  • sdaweb-channels-for-youtube/trunk/readme.txt

    r3485052 r3486796  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.4.19
     7Stable tag: 1.4.20
    88License: GPL-2.0-or-later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    212212
    213213== Changelog ==
     214
     215= 1.4.20 =
     216* Fixed author header format to match WordPress.org SDAweb standard
     217* Added Tested up to header in main plugin file
     218* Added constant definition guards to prevent redefinition conflicts
     219* Added phpcs:disable comments to all template files to suppress false-positive global variable warnings
     220* Added justification comments on public REST API permission callbacks
    214221
    215222= 1.4.19 =
  • sdaweb-channels-for-youtube/trunk/sdaweb-channels-for-youtube.php

    r3485029 r3486796  
    33 * Plugin Name: SDAweb Channels for YouTube
    44 * Description: Curate YouTube channels and display their videos on your site with grids, tabs, and lightbox playback.
    5  * Version:     1.4.19
    6  * Author:      SDAweb.no — Vinjar Romsvik, Christer Andvik, Rune Stavdal
     5 * Version:     1.4.20
     6 * Author:      SDAweb - Rune Stavdal, Vinjar Romsvik, Christer Andvik
    77 * Author URI:  https://sdaweb.no
    88 * License:     GPL-2.0-or-later
     
    1212 * Requires at least: 5.8
    1313 * Requires PHP: 7.4
     14 * Tested up to: 6.9
    1415 */
    1516
     
    1819}
    1920
    20 define( 'SDAWCHFO_VERSION', '1.4.19' );
    21 define( 'SDAWCHFO_PLUGIN_FILE', __FILE__ );
    22 define( 'SDAWCHFO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    23 define( 'SDAWCHFO_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    24 define( 'SDAWCHFO_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
     21if ( ! defined( 'SDAWCHFO_VERSION' ) )         define( 'SDAWCHFO_VERSION', '1.4.20' );
     22if ( ! defined( 'SDAWCHFO_PLUGIN_FILE' ) )     define( 'SDAWCHFO_PLUGIN_FILE', __FILE__ );
     23if ( ! defined( 'SDAWCHFO_PLUGIN_DIR' ) )      define( 'SDAWCHFO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     24if ( ! defined( 'SDAWCHFO_PLUGIN_URL' ) )      define( 'SDAWCHFO_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     25if ( ! defined( 'SDAWCHFO_PLUGIN_BASENAME' ) ) define( 'SDAWCHFO_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
    2526
    2627require_once SDAWCHFO_PLUGIN_DIR . 'includes/class-plugin.php';
Note: See TracChangeset for help on using the changeset viewer.