Plugin Directory

Changeset 3071626


Ignore:
Timestamp:
04/16/2024 01:15:48 PM (23 months ago)
Author:
flowdee
Message:

Update to version 2.1.1 from GitHub

Location:
clickwhale
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • clickwhale/tags/2.1.1/clickwhale.php

    r3070750 r3071626  
    1010 * Plugin URI:        https://clickwhale.pro
    1111 * Description:       Link Manager, Link Shortener and Click Tracker for Affiliate Links & Link Pages.
    12  * Version:           2.1.0
     12 * Version:           2.1.1
    1313 * Requires at least: 5.0
    1414 * Requires PHP:      7.4
     
    2020 * Domain Path:       /languages
    2121 */
    22 use clickwhale\includes\{ Clickwhale, Clickwhale_Activator, Clickwhale_Deactivator };
     22use clickwhale\includes\{Clickwhale, Clickwhale_Activator, Clickwhale_Deactivator};
    2323if ( !defined( 'ABSPATH' ) ) {
    2424    exit;
    2525}
    2626// Note from Freemius docs: The SDK comes with a special mechanism to auto deactivate the free version when activating the paid one. In order for this mechanism to work properly, you'd need to slightly adjust the code of the plugin's main file
    27 
    2827if ( function_exists( 'clickwhale_fs' ) ) {
    2928    clickwhale_fs()->set_basename( false, __FILE__ );
     
    3231     * Current plugin version.
    3332     */
    34     define( 'CLICKWHALE_VERSION', '2.1.0' );
     33    define( 'CLICKWHALE_VERSION', '2.1.1' );
    3534    define( 'CLICKWHALE_NAME', 'clickwhale' );
    3635    /**
     
    5251    define( 'CLICKWHALE_PUBLIC_ASSETS_DIR', CLICKWHALE_DIR_URL . 'assets/public' );
    5352    // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
    54    
    5553    if ( !function_exists( 'clickwhale_fs' ) ) {
    5654        // Create a helper function for easy SDK access.
    57         function clickwhale_fs()
    58         {
    59             global  $clickwhale_fs ;
    60            
     55        function clickwhale_fs() {
     56            global $clickwhale_fs;
    6157            if ( !isset( $clickwhale_fs ) ) {
    6258                // Include Freemius SDK.
     
    7470                    'has_affiliation' => 'all',
    7571                    'menu'            => array(
    76                     'slug'    => CLICKWHALE_SLUG,
    77                     'contact' => false,
    78                 ),
     72                        'slug'    => CLICKWHALE_SLUG,
     73                        'contact' => false,
     74                    ),
    7975                    'is_live'         => true,
    8076                ) );
    8177            }
    82            
    8378            return $clickwhale_fs;
    8479        }
    85        
     80
    8681        // Init Freemius.
    8782        clickwhale_fs();
     
    9489        clickwhale_fs()->add_action( 'after_uninstall', 'clickwhale_uninstall_cleanup' );
    9590    }
    96    
    9791    /**
    9892     * The code that runs during plugin activation.
    9993     */
    100     function activate_clickwhale()
    101     {
     94    function activate_clickwhale() {
    10295        require_once CLICKWHALE_DIR . 'includes/Clickwhale_Activator.php';
    10396        Clickwhale_Activator::activate();
    10497    }
    105    
     98
    10699    /**
    107100     * The code that runs during plugin deactivation.
    108101     */
    109     function deactivate_clickwhale()
    110     {
     102    function deactivate_clickwhale() {
    111103        require_once CLICKWHALE_DIR . 'includes/Clickwhale_Deactivator.php';
    112104        Clickwhale_Deactivator::deactivate();
    113105    }
    114    
     106
    115107    register_activation_hook( __FILE__, 'activate_clickwhale' );
    116108    register_deactivation_hook( __FILE__, 'deactivate_clickwhale' );
     
    118110     * The code for Freemius that runs after the plugin uninstall event.
    119111     */
    120     function clickwhale_uninstall_cleanup()
    121     {
     112    function clickwhale_uninstall_cleanup() {
    122113        delete_option( 'clickwhale_version' );
    123114        do_action( 'clickwhale_uninstall_cleanup' );
    124115    }
    125    
     116
    126117    /**
    127118     * Traits for Singleton
     
    142133     * @since    1.0.0
    143134     */
    144     function run_clickwhale()
    145     {
     135    function run_clickwhale() {
    146136        clickwhale()->run();
    147137    }
    148    
     138
    149139    add_action( 'plugins_loaded', 'run_clickwhale' );
    150140    /**
     
    162152     * @since 1.6.0
    163153     */
    164     function clickwhale() : Clickwhale
    165     {
     154    function clickwhale() : Clickwhale {
    166155        return Clickwhale::get_instance();
    167156    }
  • clickwhale/tags/2.1.1/includes/admin/Clickwhale_Instance_Edit.php

    r3040533 r3071626  
    146146
    147147        if ( $transient === 'added' ) {
    148             echo '<div class="updated"><p>' . __( 'Item was successfully saved', CLICKWHALE_NAME ) . '</p></div>';
     148            echo '<div class="updated"><p>' . ucwords( str_replace( '_', ' ', $this->instance_single ) ) . __( ' was successfully saved', CLICKWHALE_NAME ) . '</p></div>';
    149149        }
    150150
    151151        if ( $transient === 'updated' ) {
    152             echo '<div class="updated"><p>' . __( 'Item was successfully updated', CLICKWHALE_NAME ) . '</p></div>';
     152            echo '<div class="updated"><p>' . ucwords( str_replace( '_', ' ', $this->instance_single ) ) . __( ' was successfully updated', CLICKWHALE_NAME ) . '</p></div>';
    153153        }
    154154
     
    166166     */
    167167    public function set_edit_page_title( string $admin_title, string $title ): string {
    168         return 'Edit ' . str_replace( '_', ' ', $this->instance_single ) . ' ' . $admin_title;
     168
     169        $item = $this->get_item( $_REQUEST );
     170
     171        return 'Edit &#8220;' . esc_attr( wp_unslash( $item['title'] ) ) . '&#8221; ' . str_replace( '_', ' ', $this->instance_single ) . ' ' . $admin_title;
    169172    }
    170173
     
    179182     */
    180183    public function set_add_page_title( string $admin_title, string $title ): string {
    181         return 'Add ' . str_replace( '_', ' ', $this->instance_single ) . ' ' . $admin_title;
     184        return 'Add ' . ucwords( str_replace( '_', ' ', $this->instance_single ) ) . ' ' . $admin_title;
    182185    }
    183186
    184187    /**
    185188     * JS for current page
    186      * ¬
     189     *
    187190     * @return void
    188191     * @since 1.6.0
  • clickwhale/tags/2.1.1/includes/front/Clickwhale_Public.php

    r3070750 r3071626  
    179179            $link_url = apply_filters( 'clickwhale_url_params', $results->url, $id );
    180180            wp_redirect( $link_url, $results->redirection );
     181            exit;
    181182        }
    182183    }
  • clickwhale/tags/2.1.1/readme.txt

    r3070750 r3071626  
    66Requires PHP: 7.4.0
    77Tested up to: 6.5
    8 Stable tag: 2.1.0
     8Stable tag: 2.1.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    115115
    116116== Changelog ==
     117= Version 2.1.1 (16th April 2024) =
     118* Tweak: Optimized admin pages meta title
     119* Fix: Fixed link redirection
     120
    117121= Version 2.1.0 (15th April 2024) =
    118122* New: Added tab navigation for link edit screen
     
    252256== Upgrade Notice ==
    253257
     258= Version 2.1.1 (16th April 2024) =
     259* Fixed link redirection issue after update v2.1.0
     260
    254261= Version 1.0.0 (11th December 2022) =
    255262* Initial Release
  • clickwhale/trunk/clickwhale.php

    r3070750 r3071626  
    1010 * Plugin URI:        https://clickwhale.pro
    1111 * Description:       Link Manager, Link Shortener and Click Tracker for Affiliate Links & Link Pages.
    12  * Version:           2.1.0
     12 * Version:           2.1.1
    1313 * Requires at least: 5.0
    1414 * Requires PHP:      7.4
     
    2020 * Domain Path:       /languages
    2121 */
    22 use clickwhale\includes\{ Clickwhale, Clickwhale_Activator, Clickwhale_Deactivator };
     22use clickwhale\includes\{Clickwhale, Clickwhale_Activator, Clickwhale_Deactivator};
    2323if ( !defined( 'ABSPATH' ) ) {
    2424    exit;
    2525}
    2626// Note from Freemius docs: The SDK comes with a special mechanism to auto deactivate the free version when activating the paid one. In order for this mechanism to work properly, you'd need to slightly adjust the code of the plugin's main file
    27 
    2827if ( function_exists( 'clickwhale_fs' ) ) {
    2928    clickwhale_fs()->set_basename( false, __FILE__ );
     
    3231     * Current plugin version.
    3332     */
    34     define( 'CLICKWHALE_VERSION', '2.1.0' );
     33    define( 'CLICKWHALE_VERSION', '2.1.1' );
    3534    define( 'CLICKWHALE_NAME', 'clickwhale' );
    3635    /**
     
    5251    define( 'CLICKWHALE_PUBLIC_ASSETS_DIR', CLICKWHALE_DIR_URL . 'assets/public' );
    5352    // DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE `function_exists` CALL ABOVE TO PROPERLY WORK.
    54    
    5553    if ( !function_exists( 'clickwhale_fs' ) ) {
    5654        // Create a helper function for easy SDK access.
    57         function clickwhale_fs()
    58         {
    59             global  $clickwhale_fs ;
    60            
     55        function clickwhale_fs() {
     56            global $clickwhale_fs;
    6157            if ( !isset( $clickwhale_fs ) ) {
    6258                // Include Freemius SDK.
     
    7470                    'has_affiliation' => 'all',
    7571                    'menu'            => array(
    76                     'slug'    => CLICKWHALE_SLUG,
    77                     'contact' => false,
    78                 ),
     72                        'slug'    => CLICKWHALE_SLUG,
     73                        'contact' => false,
     74                    ),
    7975                    'is_live'         => true,
    8076                ) );
    8177            }
    82            
    8378            return $clickwhale_fs;
    8479        }
    85        
     80
    8681        // Init Freemius.
    8782        clickwhale_fs();
     
    9489        clickwhale_fs()->add_action( 'after_uninstall', 'clickwhale_uninstall_cleanup' );
    9590    }
    96    
    9791    /**
    9892     * The code that runs during plugin activation.
    9993     */
    100     function activate_clickwhale()
    101     {
     94    function activate_clickwhale() {
    10295        require_once CLICKWHALE_DIR . 'includes/Clickwhale_Activator.php';
    10396        Clickwhale_Activator::activate();
    10497    }
    105    
     98
    10699    /**
    107100     * The code that runs during plugin deactivation.
    108101     */
    109     function deactivate_clickwhale()
    110     {
     102    function deactivate_clickwhale() {
    111103        require_once CLICKWHALE_DIR . 'includes/Clickwhale_Deactivator.php';
    112104        Clickwhale_Deactivator::deactivate();
    113105    }
    114    
     106
    115107    register_activation_hook( __FILE__, 'activate_clickwhale' );
    116108    register_deactivation_hook( __FILE__, 'deactivate_clickwhale' );
     
    118110     * The code for Freemius that runs after the plugin uninstall event.
    119111     */
    120     function clickwhale_uninstall_cleanup()
    121     {
     112    function clickwhale_uninstall_cleanup() {
    122113        delete_option( 'clickwhale_version' );
    123114        do_action( 'clickwhale_uninstall_cleanup' );
    124115    }
    125    
     116
    126117    /**
    127118     * Traits for Singleton
     
    142133     * @since    1.0.0
    143134     */
    144     function run_clickwhale()
    145     {
     135    function run_clickwhale() {
    146136        clickwhale()->run();
    147137    }
    148    
     138
    149139    add_action( 'plugins_loaded', 'run_clickwhale' );
    150140    /**
     
    162152     * @since 1.6.0
    163153     */
    164     function clickwhale() : Clickwhale
    165     {
     154    function clickwhale() : Clickwhale {
    166155        return Clickwhale::get_instance();
    167156    }
  • clickwhale/trunk/includes/admin/Clickwhale_Instance_Edit.php

    r3040533 r3071626  
    146146
    147147        if ( $transient === 'added' ) {
    148             echo '<div class="updated"><p>' . __( 'Item was successfully saved', CLICKWHALE_NAME ) . '</p></div>';
     148            echo '<div class="updated"><p>' . ucwords( str_replace( '_', ' ', $this->instance_single ) ) . __( ' was successfully saved', CLICKWHALE_NAME ) . '</p></div>';
    149149        }
    150150
    151151        if ( $transient === 'updated' ) {
    152             echo '<div class="updated"><p>' . __( 'Item was successfully updated', CLICKWHALE_NAME ) . '</p></div>';
     152            echo '<div class="updated"><p>' . ucwords( str_replace( '_', ' ', $this->instance_single ) ) . __( ' was successfully updated', CLICKWHALE_NAME ) . '</p></div>';
    153153        }
    154154
     
    166166     */
    167167    public function set_edit_page_title( string $admin_title, string $title ): string {
    168         return 'Edit ' . str_replace( '_', ' ', $this->instance_single ) . ' ' . $admin_title;
     168
     169        $item = $this->get_item( $_REQUEST );
     170
     171        return 'Edit &#8220;' . esc_attr( wp_unslash( $item['title'] ) ) . '&#8221; ' . str_replace( '_', ' ', $this->instance_single ) . ' ' . $admin_title;
    169172    }
    170173
     
    179182     */
    180183    public function set_add_page_title( string $admin_title, string $title ): string {
    181         return 'Add ' . str_replace( '_', ' ', $this->instance_single ) . ' ' . $admin_title;
     184        return 'Add ' . ucwords( str_replace( '_', ' ', $this->instance_single ) ) . ' ' . $admin_title;
    182185    }
    183186
    184187    /**
    185188     * JS for current page
    186      * ¬
     189     *
    187190     * @return void
    188191     * @since 1.6.0
  • clickwhale/trunk/includes/front/Clickwhale_Public.php

    r3070750 r3071626  
    179179            $link_url = apply_filters( 'clickwhale_url_params', $results->url, $id );
    180180            wp_redirect( $link_url, $results->redirection );
     181            exit;
    181182        }
    182183    }
  • clickwhale/trunk/readme.txt

    r3070750 r3071626  
    66Requires PHP: 7.4.0
    77Tested up to: 6.5
    8 Stable tag: 2.1.0
     8Stable tag: 2.1.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    115115
    116116== Changelog ==
     117= Version 2.1.1 (16th April 2024) =
     118* Tweak: Optimized admin pages meta title
     119* Fix: Fixed link redirection
     120
    117121= Version 2.1.0 (15th April 2024) =
    118122* New: Added tab navigation for link edit screen
     
    252256== Upgrade Notice ==
    253257
     258= Version 2.1.1 (16th April 2024) =
     259* Fixed link redirection issue after update v2.1.0
     260
    254261= Version 1.0.0 (11th December 2022) =
    255262* Initial Release
Note: See TracChangeset for help on using the changeset viewer.