Plugin Directory

Changeset 3162659


Ignore:
Timestamp:
10/04/2024 10:46:08 AM (18 months ago)
Author:
secondlinethemes
Message:

up to 1.5.2

Location:
podcast-subscribe-buttons
Files:
533 added
3 edited

Legend:

Unmodified
Added
Removed
  • podcast-subscribe-buttons/trunk/includes/dismiss-notices/dismiss-notices.php

    r2223380 r3162659  
    11<?php
    2 
    32/**
    43 * Persist Admin notices Dismissal
    54 *
    6  * Copyright (C) 2016 Collins Agbonghama <http://w3guy.com>
     5 * Copyright (C) 2016 Collins Agbonghama <https://w3guy.com>
    76 *
    87 * This program is free software: you can redistribute it and/or modify
     
    2019 *
    2120 * @package Persist Admin notices Dismissal
    22  * @author  Collins Agbonghama
    23  * @author  Andy Fragen
     21 * @author  Collins Agbonghama, Andy Fragen
    2422 * @license http://www.gnu.org/licenses GNU General Public License
    25  * @version 1.4.1
    2623 */
    2724
     
    4643            add_action( 'admin_enqueue_scripts', array( __CLASS__, 'load_script' ) );
    4744            add_action( 'wp_ajax_dismiss_admin_notice', array( __CLASS__, 'dismiss_admin_notice' ) );
     45
     46            /**
     47             * Filter to activate another filter providing a simpler use case.
     48             *
     49             * @since 1.4.3
     50             *
     51             * @param bool
     52             */
     53            if ( apply_filters( 'pand_theme_loader', false ) ) {
     54                add_filter(
     55                    'pand_dismiss_notice_js_url',
     56                    function( $js_url, $composer_path ) {
     57                        return get_stylesheet_directory_uri() . $composer_path;
     58                    },
     59                    10,
     60                    2
     61                );
     62            }
    4863        }
    4964
     
    5772            }
    5873
     74            $js_url        = plugins_url( 'dismiss-notice.js', __FILE__ );
     75            $composer_path = '/vendor/collizo4sky/persist-admin-notices-dismissal/dismiss-notice.js';
     76
     77            /**
     78             * Filter dismiss-notice.js URL.
     79             *
     80             * @since 1.4.3
     81             *
     82             * @param string $js_url URL to the Javascript file.
     83             * @param string $composer_path Relative path of Javascript file from composer install.
     84             */
     85            $js_url = apply_filters( 'pand_dismiss_notice_js_url', $js_url, $composer_path );
    5986            wp_enqueue_script(
    6087                'dismissible-notices',
    61                 plugins_url( 'dismiss-notice.js', __FILE__ ),
     88                $js_url,
    6289                array( 'jquery', 'common' ),
    63                 false,
     90                '1.4.5',
    6491                true
    6592            );
     
    79106         */
    80107        public static function dismiss_admin_notice() {
    81             $option_name        = sanitize_text_field( $_POST['option_name'] );
    82             $dismissible_length = sanitize_text_field( $_POST['dismissible_length'] );
     108            $option_name        = isset( $_POST['option_name'] ) ? sanitize_text_field( wp_unslash( $_POST['option_name'] ) ) : '';
     109            $dismissible_length = isset( $_POST['dismissible_length'] ) ? sanitize_text_field( wp_unslash( $_POST['dismissible_length'] ) ) : 0;
    83110
    84             if ( 'forever' != $dismissible_length ) {
    85                 // If $dismissible_length is not an integer default to 1
    86                 $dismissible_length = ( 0 == absint( $dismissible_length ) ) ? 1 : $dismissible_length;
     111            if ( 'forever' !== $dismissible_length ) {
     112                // If $dismissible_length is not an integer default to 1.
     113                $dismissible_length = ( 0 === absint( $dismissible_length ) ) ? 1 : $dismissible_length;
    87114                $dismissible_length = strtotime( absint( $dismissible_length ) . ' days' );
    88115            }
     
    105132            $option_name = implode( '-', $array );
    106133            $db_record   = self::get_admin_notice_cache( $option_name );
    107             if ( 'forever' == $db_record ) {
     134
     135            if ( 'forever' === $db_record ) {
    108136                return false;
    109137            } elseif ( absint( $db_record ) >= time() ) {
  • podcast-subscribe-buttons/trunk/podcast-subscribe-buttons.php

    r3136110 r3162659  
    33Plugin Name: Podcast Subscribe Buttons
    44Description: Easily add custom subscribe (follow) buttons for any podcasting platform or podcast destination
    5 Version: 1.5.1
     5Version: 1.5.2
    66Author: SecondLine Themes
    77Author URI: https://secondlinethemes.com
  • podcast-subscribe-buttons/trunk/readme.txt

    r3136110 r3162659  
    5555== Changelog ==
    5656
     57= 1.5.2 =
     58* Fixed: Dismiss noticed
     59
     60= 1.5.1 =
     61* Added: New icons: AntennaPod, Anytime Player, Aurelian, Castamatic, HyperCatcher, iCatcher, Podcast Guru
     62
    5763= 1.5.0 =
    58 * Added: New icons: AntennaPod, Anytime Player, Aurelian, Castamatic, HyperCatcher, iCatcher, Podcast Guru
    59 
    60 = 1.4.9 =
    6164* Fixed: Broken styles for button colors.
    6265
Note: See TracChangeset for help on using the changeset viewer.