Changeset 3168744
- Timestamp:
- 10/14/2024 04:11:21 PM (6 months ago)
- Location:
- apppresser/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
apppresser/trunk/README.md
r3144402 r3168744 36 36 37 37 ## Changelog 38 39 ### 4.4.5 40 * Removed old legacy code 38 41 39 42 ### 4.4.4 -
apppresser/trunk/apppresser.php
r3144402 r3168744 6 6 Text Domain: apppresser 7 7 Domain Path: /languages 8 Version: 4.4. 48 Version: 4.4.5 9 9 Author: AppPresser Team 10 10 Author URI: http://apppresser.com … … 34 34 class AppPresser { 35 35 36 const VERSION = '4.4. 4';36 const VERSION = '4.4.5'; 37 37 const SETTINGS_NAME = 'appp_settings'; 38 38 public static $settings = 'false'; … … 136 136 require_once(self::$inc_path . 'AppPresser_Media_Settings.php'); 137 137 require_once(self::$inc_path . 'plugin-updater.php'); 138 require_once(self::$inc_path . 'AppPresser_Ajax_Extras.php');139 138 require_once(self::$inc_path . 'AppPresser_Remote_Scripts.php'); 140 139 require_once(self::$inc_path . 'AppPresser_AppGeo.php'); -
apppresser/trunk/inc/AppPresser_User.php
r3093975 r3168744 19 19 'avatar' => get_avatar_url($user->ID), 20 20 'cookie_auth' => $cookie_auth, 21 'login_redirect' => AppPresser_ Ajax_Extras::get_login_redirect(), // v3 only21 'login_redirect' => AppPresser_WPAPI_Mods::get_login_redirect(), // v3 only 22 22 'success' => true, 23 23 'user_id' => $user->ID -
apppresser/trunk/inc/AppPresser_WPAPI_Mods.php
r3143568 r3168744 353 353 ); 354 354 355 $redirect = $this->get_logout_redirect();355 $redirect = self::get_logout_redirect(); 356 356 if($redirect) { 357 357 $response['logout_redirect'] = $redirect; … … 593 593 } 594 594 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 } 612 651 613 652 /* -
apppresser/trunk/readme.txt
r3144402 r3168744 5 5 Requires at least: 4.7.0 6 6 Tested up to: 6.6 7 Stable tag: 4.4. 47 Stable tag: 4.4.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 47 47 48 48 == Changelog == 49 50 = 4.4.5 = 51 * Removed old legacy code 49 52 50 53 = 4.4.4 =
Note: See TracChangeset
for help on using the changeset viewer.