Plugin Directory

Changeset 3168744


Ignore:
Timestamp:
10/14/2024 04:11:21 PM (6 months ago)
Author:
marioshtika
Message:

Release 4.4.5

Location:
apppresser/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • apppresser/trunk/README.md

    r3144402 r3168744  
    3636
    3737## Changelog
     38
     39### 4.4.5
     40* Removed old legacy code
    3841
    3942### 4.4.4
  • apppresser/trunk/apppresser.php

    r3144402 r3168744  
    66Text Domain: apppresser
    77Domain Path: /languages
    8 Version: 4.4.4
     8Version: 4.4.5
    99Author: AppPresser Team
    1010Author URI: http://apppresser.com
     
    3434class AppPresser {
    3535
    36     const VERSION           = '4.4.4';
     36    const VERSION           = '4.4.5';
    3737    const SETTINGS_NAME     = 'appp_settings';
    3838    public static $settings = 'false';
     
    136136        require_once(self::$inc_path . 'AppPresser_Media_Settings.php');
    137137        require_once(self::$inc_path . 'plugin-updater.php');
    138         require_once(self::$inc_path . 'AppPresser_Ajax_Extras.php');
    139138        require_once(self::$inc_path . 'AppPresser_Remote_Scripts.php');
    140139        require_once(self::$inc_path . 'AppPresser_AppGeo.php');
  • apppresser/trunk/inc/AppPresser_User.php

    r3093975 r3168744  
    1919            'avatar' => get_avatar_url($user->ID),
    2020            'cookie_auth' => $cookie_auth,
    21             'login_redirect' => AppPresser_Ajax_Extras::get_login_redirect(), // v3 only
     21            'login_redirect' => AppPresser_WPAPI_Mods::get_login_redirect(), // v3 only
    2222            'success' => true,
    2323            'user_id' => $user->ID
  • apppresser/trunk/inc/AppPresser_WPAPI_Mods.php

    r3143568 r3168744  
    353353        );
    354354
    355         $redirect = $this->get_logout_redirect();
     355        $redirect = self::get_logout_redirect();
    356356        if($redirect) {
    357357            $response['logout_redirect'] = $redirect;
     
    593593    }
    594594
    595     /**
    596      * Get the login redirect for the app's login modal
    597      *
    598      * @since 3.3.0
    599      * @return string | array( 'url' => '', 'title' => '' )
    600      */
    601     public function get_logout_redirect() {
    602 
    603         if( has_filter( 'appp_logout_redirect' ) ) {
    604             $redirect_to = apply_filters( 'appp_logout_redirect', '' );
    605 
    606             return AppPresser_Ajax_Extras::add_redirect_title( $redirect_to );
    607            
    608         } else {
    609             return '';
    610         }
    611     }
     595    /**
     596     * Get the login redirect for the app's login modal
     597     *
     598     * @since 3.2.1
     599     * @return string | array( 'url' => '', 'title' => '' )
     600     */
     601    public static function get_login_redirect()
     602    {
     603        if (has_filter('appp_login_redirect')) {
     604            $redirect_to = apply_filters('appp_login_redirect', '');
     605
     606            return self::add_redirect_title($redirect_to);
     607        } else {
     608            return '';
     609        }
     610    }
     611
     612    /**
     613     * Get the login redirect for the app's login modal
     614     *
     615     * @since 3.3.0
     616     * @return string | array( 'url' => '', 'title' => '' )
     617     */
     618    public static function get_logout_redirect()
     619    {
     620        if (has_filter('appp_logout_redirect')) {
     621            $redirect_to = apply_filters('appp_logout_redirect', '');
     622
     623            return self::add_redirect_title($redirect_to);
     624        } else {
     625            return '';
     626        }
     627    }
     628
     629    /**
     630     * Use the URL to get title or just returns a string if it is a app custom page slug
     631     *
     632     * @since 3.3.0
     633     *
     634     * @return string | array( 'url' => '', 'title' => '' )
     635     */
     636    public static function add_redirect_title($redirect_to)
     637    {
     638        if (is_string($redirect_to) && strpos($redirect_to, 'http') !== false) {
     639            // a URL
     640            $post_id = url_to_postid($redirect_to);
     641
     642            return array(
     643                'url' => $redirect_to,
     644                'title' => ($post_id) ? get_the_title($post_id) : '',
     645            );
     646        } else {
     647            // An app custom page slug
     648            return $redirect_to;
     649        }
     650    }
    612651
    613652    /*
  • apppresser/trunk/readme.txt

    r3144402 r3168744  
    55Requires at least: 4.7.0
    66Tested up to: 6.6
    7 Stable tag: 4.4.4
     7Stable tag: 4.4.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747
    4848== Changelog ==
     49
     50= 4.4.5 =
     51* Removed old legacy code
    4952
    5053= 4.4.4 =
Note: See TracChangeset for help on using the changeset viewer.