Plugin Directory

Changeset 3265913


Ignore:
Timestamp:
04/02/2025 09:39:06 PM (9 months ago)
Author:
webdevstudios
Message:

release version 1.2.5

Location:
automatic-featured-images-from-videos
Files:
9 added
5 edited

Legend:

Unmodified
Added
Removed
  • automatic-featured-images-from-videos/trunk/automatic-featured-images-from-videos.php

    r3148865 r3265913  
    44 * Plugin URI: https://webdevstudios.com
    55 * Description: If a YouTube or Vimeo video exists in the first few paragraphs of a post, automatically set the post's featured image to that video's thumbnail.
    6  * Version: 1.2.4
     6 * Version: 1.2.5
    77 * Author: WebDevStudios
    88 * Author URI: https://webdevstudios.com
  • automatic-featured-images-from-videos/trunk/includes/ajax.php

    r2984965 r3265913  
    2222
    2323    // Allow developers to pass in custom CPTs to process.
    24     $type_array = apply_filters( 'wds_featured_images_from_video_post_types', array( 'post', 'page' ) );
     24    $type_array = apply_filters( 'wds_featured_images_from_video_post_types', [ 'post', 'page' ] );
    2525
    2626    if ( is_array( $type_array ) && in_array( $post_type, $type_array ) ) {
    27         $args = array(
     27        $args = [
    2828            'post_type'       => $post_type,
    2929            'status'          => wds_featured_images_from_video_processing_status( $post_type ),
    3030            'processing_text' => wds_featured_images_from_video_processing_current_disposition(),
    3131            'bulk_text'       => esc_html__( 'Bulk add video thumbnails', 'wds_automatic_featured_images_from_videos' ),
    32         );
     32            'nonce'           => wp_create_nonce( 'wdsafi-ajax-nonce' )
     33        ];
    3334
    3435        wp_localize_script( 'wds_featured_images_from_video_script', 'wds_featured_image_from_vid_args', $args );
  • automatic-featured-images-from-videos/trunk/includes/bulk-operations.php

    r1834150 r3265913  
    1616function wds_queue_bulk_processing() {
    1717
     18    if ( empty( $_POST['wdsafi_nonce'] ) || ! wp_verify_nonce( $_POST['wdsafi_nonce'], 'wdsafi-ajax-nonce' ) ) {
     19        wp_die( esc_html__( 'Nonce failure', 'automatic-featured-images-from-videos' ) );
     20    }
     21
    1822    /**
    1923     * Allow developers to pass in custom post types to process.
     
    2327     * @param array $value Array of post types to process.
    2428     */
    25     $type_array = apply_filters( 'wds_featured_images_from_video_post_types', array( 'post', 'page' ) );
     29    $type_array = apply_filters( 'wds_featured_images_from_video_post_types', [ 'post', 'page' ] );
    2630
    2731    if ( ! in_array( $_POST['posttype'], $type_array ) ) {
    2832        return;
    2933    }
    30     wp_schedule_single_event( time() + 60, 'wds_bulk_process_video_query_init', array( $_POST['posttype'] ) );
     34    wp_schedule_single_event( time() + 60, 'wds_bulk_process_video_query_init', [ $_POST['posttype'] ] );
    3135}
    3236
     
    5862    $reschedule_task = wds_automatic_featured_images_from_videos_wp_query( $post_type, $posts_to_process );
    5963    if ( $reschedule_task->post_count > 1 ) {
    60         wp_schedule_single_event( time() + ( 60 * 10 ), 'wds_bulk_process_video_query_init', array( $post_type ) );
     64        wp_schedule_single_event( time() + ( 60 * 10 ), 'wds_bulk_process_video_query_init', [ $post_type ] );
    6165    }
    6266}
  • automatic-featured-images-from-videos/trunk/js/button.js

    r1834150 r3265913  
    1414                type: "POST",
    1515                url : ajaxurl,
    16                 data: {action: 'wds_queue_bulk_processing', posttype: wds_featured_image_from_vid_args.post_type}
     16                data: {
     17                    action      : 'wds_queue_bulk_processing',
     18                    posttype    : wds_featured_image_from_vid_args.post_type,
     19                    wdsafi_nonce: wds_featured_image_from_vid_args.nonce,
     20                }
    1721            });
    1822        });
  • automatic-featured-images-from-videos/trunk/readme.txt

    r3148865 r3265913  
    55Tags: video, youtube, vimeo, featured image
    66Requires at least: 5.0
    7 Tested up to: 6.6.1
    8 Stable tag: 1.2.4
     7Tested up to: 6.7.2
     8Stable tag: 1.2.5
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040
    4141== Changelog ==
     42
     43= 1.2.5 =
     44* Updated: added nonce verification to bulk processing cron scheduling request.
    4245
    4346= 1.2.4 =
Note: See TracChangeset for help on using the changeset viewer.