Plugin Directory

Changeset 3216437


Ignore:
Timestamp:
01/03/2025 11:56:44 AM (3 months ago)
Author:
marioshtika
Message:

Release 4.4.9

Location:
apppresser/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • apppresser/trunk/README.md

    r3202388 r3216437  
    3636
    3737## Changelog
     38
     39### 4.4.9
     40* Removed deprecated functionalities
     41* Add an admin notice for legacy extensions
     42* Improved the AppPresser plugin updater
    3843
    3944### 4.4.8
  • apppresser/trunk/apppresser.php

    r3202388 r3216437  
    66Text Domain: apppresser
    77Domain Path: /languages
    8 Version: 4.4.8
     8Version: 4.4.9
    99Author: AppPresser Team
    1010Author URI: http://apppresser.com
     
    3434class AppPresser {
    3535
    36     const VERSION           = '4.4.8';
     36    const VERSION           = '4.4.9';
    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_Remote_Scripts.php');
    139138        require_once(self::$inc_path . 'AppPresser_AppGeo.php');
    140139        require_once(self::$inc_path . 'AppPresser_WPAPI_Mods.php');
  • apppresser/trunk/inc/AppPresser_Admin_Settings.php

    r3121259 r3216437  
    2828    public static $admin_tabs      = array();
    2929    public static $license_keys    = array();
    30     public static $license_fields  = array();
    31     public static $general_fields  = array();
    32     public static $customize_fields = array();
    33     public static $color_fields     = array();
    34     public static $advanced_fields  = array();
    35     public static $v2only_fields   = array();
    3630    public static $deprecate_ver   = 0;
    3731    public $themes;
     
    106100        }
    107101    }
    108 
    109     /**
    110      * phonegap_versions function.
    111      *
    112      * @access public
    113      * @return array
    114      */
    115     public function phonegap_versions() {
    116 
    117         return $pg_versions = array( '3.5.0' => '3.5.0', '3.6.3' => '3.6.3', '3.7.0' => '3.7.0' );
    118 
    119     }
    120 
    121102
    122103    /**
     
    485466                    $current_class = $tab == $current_tab ? ' nav-tab-active' : '';
    486467
    487                     $has_gen_subtab = ( isset( self::$general_fields[ $tab ] ) );
    488                     $has_adv_subtab = ( isset( self::$advanced_fields[ $tab ] ) );
    489                     $has_cst_subtab = ( isset( self::$customize_fields[ $tab ] ) );
    490                     $has_clr_subtab = ( isset( self::$color_fields[ $tab ] ) );
    491                     $has_lic_subtab = ( $tab == 'general' && count( self::$license_fields ) );
    492                     $has_v2_subtab  = ( isset( self::$v2only_fields[ $tab ] ) );
    493                     $subtab_links = array();
    494 
    495                     // If the only tab is general, don't show it
    496                     if ( ! $has_adv_subtab && ! $has_lic_subtab && ! $has_v2_subtab ) {
    497                         $has_gen_subtab = false;
    498                     }
    499 
    500                     if( $has_gen_subtab ) {
    501                         $subtab_links[] = '<li><a href="?page=apppresser_settings&tab=tab-'.$tab.'&subnav=general" class="subnav-tab current" id="tab-'.$tab.'-subnav-general" data-selector="general-subtab.subtab-'.$tab.'">' . __('General', 'apppresser') . '</a>'
    502                             . ( ($has_adv_subtab || $has_lic_subtab || $has_v2_subtab)?' | ':'' ) . '</li>';
    503 
    504                     }
    505                     if( $has_cst_subtab ) {
    506                         $subtab_links[] = '<li><a href="?page=apppresser_settings&tab=tab-'.$tab.'&subnav=customize" class="subnav-tab" id="tab-'.$tab.'-subnav-customize"  data-selector="customize-subtab.subtab-'.$tab.'">' . __('Customize', 'apppresser') . '</a>'
    507                             . ( ($has_clr_subtab || $has_adv_subtab || $has_lic_subtab || $has_v2_subtab)?' | ':'' ) . '</li>';
    508                     }
    509                     if( $has_clr_subtab ) {
    510                         $subtab_links[] = '<li><a href="?page=apppresser_settings&tab=tab-'.$tab.'&subnav=color" class="subnav-tab" id="tab-'.$tab.'-subnav-color"  data-selector="color-subtab.subtab-'.$tab.'">' . __('Colors', 'apppresser') . '</a>'
    511                             . ( ($has_adv_subtab || $has_lic_subtab || $has_v2_subtab)?' | ':'' ) . '</li>';
    512                     }
    513                     if( $has_adv_subtab ) {
    514                         $subtab_links[] = '<li><a href="?page=apppresser_settings&tab=tab-'.$tab.'&subnav=advanced" class="subnav-tab" id="tab-'.$tab.'-subnav-advanced"  data-selector="advanced-subtab.subtab-'.$tab.'">' . __('Advanced', 'apppresser') . '</a>'
    515                             . ( ($has_lic_subtab || $has_v2_subtab)?' | ':'' ) . '</li>';
    516                     }
    517                     if( $has_v2_subtab ) {
    518                         $subtab_links[] = '<li><a href="?page=apppresser_settings&tab=tab-'.$tab.'&subnav=v2-only" class="subnav-tab" id="tab-'.$tab.'-subnav-v2-only"  data-selector="v2-only-subtab.subtab-'.$tab.'">' . __('AppPresser 2', 'apppresser') . '</a>'
    519                             . ( ($has_lic_subtab)?' | ':'' ) . '</li>';
    520                     }
    521                     if( $has_lic_subtab ) {
    522                         $subtab_links[] = '<li><a href="?page=apppresser_settings&tab=tab-'.$tab.'&subnav=license" class="subnav-tab" id="tab-'.$tab.'-subnav-license"  data-selector="license-subtab.subtab-'.$tab.'">' . __('Licenses', 'apppresser') . '</a></li>';
    523                     }
    524 
    525468                    echo '<table class="appp-tabs form-table tab-'. $tab . $current_class .'">';
    526469                        // A hook for adding additional data to the top of each tabbed area
    527470                        do_action( "apppresser_tab_top_$tab", $appp_settings, self::settings() );
    528 
    529                         if( $has_gen_subtab || $has_v2_subtab || $has_lic_subtab || $has_cst_subtab ) {
    530                             echo '<tr class="subtabs-wrapper">';
    531                             echo '<td colspan="2">';
    532                             echo '<ul class="subsubsub">';
    533                             echo implode("\n", $subtab_links);
    534                             echo '</ul><div style="clear:both"></div>';
    535                         }
    536471                       
    537472                        // Tab main content or General subtab content
    538473                        if ( isset( self::$all_fields[ $tab ] ) ) {
    539                             if( $has_gen_subtab ) {
    540                                 echo '<table class="appp-subtab general-subtab subtab-'.$tab.' subnav-tab-active">';
    541                                 do_action( "apppresser_tab_".$tab."_subtab_general_top", $appp_settings, self::settings() );
    542                             }
    543474                            echo implode( "\n", self::$all_fields[ $tab ] );
    544                             if( $has_gen_subtab ) {
    545                                 do_action( "apppresser_tab_".$tab."_subtab_general_bottom", $appp_settings, self::settings() );
    546                                 echo '</table>';
    547                             }
    548                         }
    549 
    550                         // Advanced Tab
    551                         if( $has_adv_subtab ) {
    552                             echo '<table class="appp-subtab advanced-subtab subtab-'.$tab.'">';
    553                             do_action( "apppresser_tab_".$tab."_subtab_advanced_top", $appp_settings, self::settings() );
    554                             echo implode( "\n", self::$advanced_fields[ $tab ] );
    555                             do_action( "apppresser_tab_".$tab."_subtab_advanced_bottom", $appp_settings, self::settings() );
    556                             echo '</table>';
    557                         }
    558 
    559                         // License Tab
    560                         if( $has_lic_subtab ) {
    561                             echo '<table class="appp-subtab license-subtab subtab-'.$tab.'">';
    562                             echo '<tr valign="top" class="apppresser-apppresser-core-settings"><th colspan="2" scope="row" class="appp-section-title"><h3>'.__('AppPresser Licenses','apppresser').'</h3></th></tr>';
    563                             do_action( "apppresser_tab_general_subtab_license_top", $appp_settings, self::settings() );
    564                             foreach (self::$license_fields as $key => $subtab_licenses) {
    565                                 echo implode( "\n",  $subtab_licenses );
    566                             }
    567                             do_action( "apppresser_tab_general_subtab_license_bottom", $appp_settings, self::settings() );
    568                             echo '</table>';
    569                         }
    570 
    571                         if ( isset( self::$all_fields[ $tab ] ) ) {
    572                             // v2 Tab
    573                             if( $has_v2_subtab ) {
    574                                 echo '<table class="appp-subtab v2-only-subtab subtab-'.$tab.'">';
    575                                 echo '<tr valign="top" class="apppresser-apppresser-core-settings"><th colspan="2" scope="row" class="appp-section-title"><h3>'.__('AppPresser 2 only','apppresser').'</h3>
    576                                 <h4>'. __('These settings are only for AppPresser 2', 'apppresser') .'</h4>
    577                                 </th></tr>';
    578                                 do_action( "apppresser_tab_".$tab."_subtab_v2-only_top", $appp_settings, self::settings() );
    579                                 echo implode( "\n", self::$v2only_fields[ $tab ] );
    580                                 do_action( "apppresser_tab_".$tab."_subtab_v2-only_bottom", $appp_settings, self::settings() );
    581                                 echo '</table>';
    582                             }
    583                         }
    584 
    585 
    586                         // Customize Tab
    587                         if( $has_cst_subtab ) {
    588                             echo '<table class="appp-subtab customize-subtab subtab-'.$tab.'">';
    589                             echo '<tr valign="top" class="apppresser-apppresser-core-settings"><th colspan="2" scope="row" class="appp-section-title"><h3>'.__('Customize Your App Theme (v2 only)','apppresser').'</h3></th></tr>';
    590                             do_action( "apppresser_tab_general_subtab_customize_top", $appp_settings, self::settings() );
    591                             foreach (self::$customize_fields as $key => $subtab_customize) {
    592                                 echo implode( "\n",  $subtab_customize );
    593                             }
    594                             do_action( "apppresser_tab_general_subtab_customize_bottom", $appp_settings, self::settings() );
    595                             echo '</table>';
    596                         }
    597 
    598                         // Color Tab
    599                         if( $has_clr_subtab ) {
    600                             echo '<table class="appp-subtab color-subtab subtab-'.$tab.'">';
    601                             echo '<tr valign="top" class="apppresser-apppresser-core-settings"><th colspan="2" scope="row" class="appp-section-title"><h3>'.__('App Colors (v2 only)','apppresser').'</h3></th></tr>';
    602                             do_action( "apppresser_tab_general_subtab_color_top", $appp_settings, self::settings() );
    603                             foreach (self::$color_fields as $key => $subtab_color) {
    604                                 echo implode( "\n",  $subtab_color );
    605                             }
    606                             do_action( "apppresser_tab_general_subtab_color_bottom", $appp_settings, self::settings() );
    607                             echo '</table>';
    608                         }
    609 
    610                         if( $has_gen_subtab || $has_adv_subtab || $has_lic_subtab || $has_v2_subtab || $has_cst_subtab || $has_clr_subtab ) {
    611                             echo '</td>';
    612                             echo '</tr>';
    613475                        }
    614476
     
    648510        // Main tab
    649511        self::add_setting_tab( __( 'AppPresser', 'apppresser' ), 'general' );
    650        
    651         if( self::is_deprecated( 2 ) )
    652             self::add_setting_label( __( 'AppPresser Core Settings', 'apppresser' ), array(
    653                 'subtab' => 'general',
    654             ) );
    655 
    656         self::add_setting( 'appp_theme', __( 'App-only theme', 'apppresser' ), array(
    657             'type' => 'select',
    658             'options' => apply_filters( 'filter_appthemes', $this->themes ),
    659             'helptext' => __( 'Select which theme you want to be loaded inside the app, such as the AppPresser theme.', 'apppresser' ),
    660             'description' => __( 'Must be enabled above.', 'apppresser' ),
    661             'subtab' => 'v2-only',
    662             'deprecated' => 2,
    663         ) );
    664 
    665         // Deprecated in 2.7.0
    666         /*self::add_setting( 'customizer_link', __( 'App Design', 'apppresser' ), array(
    667             'type' => 'paragraph',
    668             'helptext' => __( 'Opens the customizer to customize the look of your app.', 'apppresser' ),
    669             'value' => __( '<span></span>', 'apppresser' ),
    670             'description' => __( 'Click here to customize app colors, menus, homepage & more.', 'apppresser' ),
    671             'subtab' => 'v2-only',
    672             'deprecated' => 2,
    673         ) );*/
    674 
    675         self::add_setting( 'appp_show_on_front', __( 'Use a unique homepage for your app.', 'apppresser' ), array(
    676             'type' => 'radio',
    677             'options' => array('latest_posts' => 'Your latest posts', 'static_page' => 'A static page (select below)' ),
    678             'helptext' => __( 'Allows you to specify which page users will see first when they load up you AppPresser app.', 'apppresser' ),
    679             'description' => __( 'Select homepage option.', 'apppresser' ),
    680             'subtab' => 'v2-only',
    681             'deprecated' => 2,
    682         ) );
    683 
    684         self::add_setting( 'appp_home_page', '', array(
    685             // 'helptext' => __( 'Allows you to specify which page users will see first when they load up you AppPresser app.', 'apppresser' ),
    686             'description' => __( 'Start typing to search for a page, or enter a page ID.', 'apppresser' ),
    687             'subtab' => 'v2-only',
    688             'deprecated' => 2,
    689         ) );
    690 
    691         if( self::$deprecate_ver < 2 ) {
    692             self::add_setting_label( __( 'AppPresser Settings', 'apppresser' ), array(
    693                 'subtab' => 'general',
    694             ) );
    695         }
     512
    696513
    697514        self::add_setting_label( __( 'AppPresser Settings', 'apppresser' ) );
     
    733550        ));
    734551
    735         self::add_setting_label( __( 'Advanced Settings', 'apppresser' ), array(
    736             'subtab' => 'v2-only',
    737             'deprecated' => 2,
    738         ) );
    739 
    740         self::add_setting( 'app_offline_toggle', __( 'Disable offline toggle buttons?', 'apppresser' ), array(
    741             'type' => 'checkbox',
    742             'helptext' => __( 'When the app disconnects from the internet, the app will display buttons that allows the user to switch to a customized offline.html file located in the app or return to the WordPress site. AppPresser 2 only.', 'apppresser' ),
    743             'description' => __( 'Don\'t allow the user to switch between online and offline mode when connection is lost.', 'apppresser' ),
    744             'subtab' => 'v2-only',
    745             'deprecated' => 2,
    746         ) );
    747 
    748         // For now...
    749         if ( appp_get_setting( 'mobile_browser_theme_switch' ) ) {
    750             self::add_setting( 'mobile_browser_theme_switch', __( 'Load AppPresser for mobile browsers', 'apppresser' ), array(
    751                 'type' => 'checkbox',
    752                 'helptext' => __( 'Display AppPresser in mobile browsers such as Safari and Chrome, instead of your normal theme.', 'apppresser' ),
    753                 'subtab' => 'v2-only',
    754                 'deprecated' => 2,
    755             ) );
    756         }
    757 
    758         self::add_setting( 'admin_theme_switch', __( 'Load AppPresser for Admins Only', 'apppresser' ), array(
    759             'type' => 'checkbox',
    760             'helptext' => __( 'Check this if you want to test your AppPresser app without loading it for visitors to your site.', 'apppresser' ),
    761             'description' => __( '(for testing purposes)', 'apppresser' ),
    762             'subtab' => 'v2-only',
    763             'deprecated' => 2,
    764         ) );
    765 
    766         self::add_setting( 'appp_pg_version', __( 'Phonegap Version', 'apppresser' ), array(
    767             'type' => 'select',
    768             'options' => $this->phonegap_versions(),
    769             'helptext' => __( 'Select the Phonegap Version of your app.', 'apppresser' ),
    770             'description' => __( 'Select Phonegap Version. <b>For AppPresser 1 only</b>', 'apppresser' ),
    771             'subtab' => 'v2-only',
    772             'deprecated' => 1,
    773         ) );
    774        
    775         if( self::$deprecate_ver ) {
    776             self::add_setting( 'apppresser_deprecate', __( 'Version 2', 'apppresser' ), array(
    777                 'type' => 'paragraph',
    778                 'value' => $this->toggle_deprecated_version(),
    779                 'helptext' => __( 'Disable/Enable all functionality for version 2', 'apppresser' ),
    780                 'subtab' => 'general',
    781         ) );
    782         }
    783 
    784         $menus = array( 'option-none' => __( '-- select --', 'apppresser' ) );
    785         foreach ( (array) $this->nav_menus as $menu ) {
    786             $menus[ $menu->term_id ] = $menu->name;
    787         }
    788 
    789         // Register main menu setting
    790         self::add_setting( 'menu', __( 'Main App Menu', 'apppresser' ), array(
    791             'type' => 'select',
    792             'options' => $menus,
    793             'helptext' => __( 'Use a custom main menu inside your app, different from your main site.', 'apppresser' ),
    794             'subtab' => 'customize',
    795         ) );
    796 
    797         // Register secondary  menu setting
    798         self::add_setting( 'secondary_menu', __( 'Secondary App Menu', 'apppresser' ), array(
    799             'type' => 'select',
    800             'options' => $menus,
    801             'helptext' => __( 'Use a custom secondary menu inside your app (the top right dropdown in the header).', 'apppresser' ),
    802             'subtab' => 'customize',
    803         ) );
    804 
    805         // Let apptheme and child themes add more menu settings here.
    806         // Also, be sure to hook into the options_update_{appp_settings} to
    807         // copy the menus appp_settings to the theme_mods_{$stylesheet} options
    808         do_action( 'appp_custom_menu_settings', $this, $menus );
    809 
    810         self::add_setting( 'appp_logo', __( 'App Logo', 'apppresser' ), array(
    811             'type' => 'file',
    812             'helptext' => '',
    813             'description' => 'URL to image',
    814             'subtab' => 'customize',
    815         ) );
    816 
    817         self::add_setting( 'mobile_list_style', __( 'List Style', 'apppresser' ), array(
    818             'type' => 'select',
    819             'options' => array(
    820                 'Thumbnail list',
    821                 'No thumbnails',
    822                 'Card List',
    823             ),
    824             'subtab' => 'customize',
    825         ) );
    826 
    827         if( class_exists( 'AppPresser_Swipers' ) ) {
    828             self::add_setting_label( __( 'AppSwiper Settings', 'apppresser' ), array(
    829                 'subtab' => 'customize',
    830             ) );
    831 
    832             self::add_setting('slider_control', __('Add slider to homepage?', 'apppresser'), array(
    833                 'type' => 'checkbox',
    834                 'subtab' => 'customize',
    835             ) );
    836 
    837 
    838             // AppSwiper Category dropdown
    839             $categories = get_categories( array(
    840                 'orderby' => 'name',
    841                 'order'   => 'ASC'
    842             ) );
    843 
    844             $_cats = array('all'=>'All');
    845 
    846             foreach ( $categories as $cat ) {
    847                 $_cats[$cat->slug] = $cat->name;
    848             }
    849 
    850             self::add_setting( 'slider_category_control', __( 'What category?', 'apppresser' ), array(
    851                 'type' => 'select',
    852                 'options' => $_cats,
    853                 'subtab' => 'customize',
    854             ) );
    855            
    856         }
    857 
    858         if( class_exists( 'AppBuddy' ) ) {
    859 
    860             self::add_setting_label( __( 'AppBuddy Settings', 'apppresser' ), array(
    861                 'subtab' => 'customize',
    862             ) );
    863 
    864             self::add_setting('ab_color_mod', __('Login Screen Background Color', 'apppresser'), array(
    865                 'type' => 'color',
    866                 'default' => apply_filters( 'appp_ab_color_mod', '#FFFFFF' ),
    867                 'subtab' => 'customize',
    868             ) );
    869 
    870             self::add_setting('ab_image_mod', __('Login Screen Background Image', 'apppresser'), array(
    871                 'type' => 'file',
    872                 'subtab' => 'customize',
    873             ) );
    874 
    875             self::add_setting('ab_text_mod', __('Login Screen Text', 'apppresser'), array(
    876                 'type' => 'text',
    877                 'subtab' => 'customize',
    878             ) );
    879         }
    880 
    881 
    882552        add_action( 'apppresser_tab_buttons_general', array( $this, 'help_link' ) );
    883553
     
    892562    public function help_link() {
    893563        echo '<a href="'. esc_url( add_query_arg( 'page', self::$help_slug, admin_url( 'admin.php' ) ) ) .'">'. __( 'Help/Support', 'apppresser' ) .'</a>';
    894     }
    895 
    896     public function toggle_deprecated_version() {
    897         if( ! AppPresser::$deprecate_ver ) {
    898             return '<p><a href="'. esc_url( add_query_arg( 'appp_deprecate_ver', '2', add_query_arg( 'page', self::$page_slug, admin_url( 'admin.php' ) ) ) ) .'">'. __( 'Deprecate AppPresser 2', 'apppresser' ) .'</a></p>';
    899         } else {
    900             return '<p><a href="'. esc_url( add_query_arg( 'appp_deprecate_ver', '0', add_query_arg( 'page', self::$page_slug, admin_url( 'admin.php' ) ) ) ) .'">'. __( 'Enable AppPresser 2', 'apppresser' ) .'</a></p>';
    901         }
    902564    }
    903565
     
    1018680                break;
    1019681
    1020             case 'license_key':
    1021                 $license_status = self::settings( $key .'_status' );
    1022                 $class          = 'active';
    1023                 $notice         = __( 'Active' , 'apppresser' );
    1024 
    1025                 if ( $license_status != 'valid' ) {
    1026                     $class = 'inactive';
    1027                     $notice = $license_status == 'invalid' ? __( 'Invalid Key' , 'apppresser' ) : '<a href="http://apppresser.com/extensions/">'. __( 'Get a license', 'apppresser' ) .'</a>';
    1028                 }
    1029 
    1030                 $field .= sprintf( '<input class="regular-text" type="text" id="apppresser--%1$s" name="appp_settings[%2$s]" value="%3$s" />'."\n", $key, $key, $value );
    1031                 $field .= sprintf( '<p class="description license_key"><span class="regular-text %1$s">%2$s</span></p>', $class, $notice );
    1032 
    1033                 break;
    1034 
    1035682            case 'h3':
    1036683                break;
     
    1087734        ';
    1088735
    1089         if( $args['subtab'] == 'general' ) {
    1090             self::$general_fields[ $args['tab'] ][ $key ] = $_field;
    1091         }
    1092 
    1093         if( $type == 'license_key' ) {
    1094             self::$license_fields[ $args['tab'] ][ $key ] = $_field;
    1095         } else if( $args['subtab'] == 'advanced' ) {
    1096             self::$advanced_fields[ $args['tab'] ][ $key ] = $_field;
    1097         } else if( $args['subtab'] == 'customize' ) {
    1098             self::$customize_fields[ $args['tab'] ][ $key ] = $_field;
    1099         } else if( $args['subtab'] == 'color' ) {
    1100             self::$color_fields[ $args['tab'] ][ $key ] = $_field;
    1101         } else if( $args['subtab'] == 'v2-only' ) {
    1102             self::$v2only_fields[ $args['tab'] ][ $key ] = $_field;
    1103         } else {
    1104             self::$all_fields[ $args['tab'] ][ $key ] = $_field;
    1105         }
     736        self::$all_fields[ $args['tab'] ][ $key ] = $_field;
    1106737
    1107738        self::$field_args[ $key ] = array( 'args' => $args );
     
    1297928            add_action('admin_notices', array($this, 'missing_jwt_auth_secret_key_admin_notice'));
    1298929        }
     930       
     931        add_action('admin_notices', array($this, 'legacy_extentions_admin_notice'));
    1299932    }
    1300933
     
    1323956        <?php
    1324957    }
     958
     959    public function legacy_extentions_admin_notice()
     960    {
     961        $app_camera = defined('AppPresser_Camera::APPP_KEY');
     962        $app_commerce = defined('AppCommerce::APPP_KEY');
     963        $app_community = defined('AppCommunity::APPP_KEY');
     964        $app_lms = defined('AppLMS::APPP_KEY');
     965        $app_push = defined('AppPresser_Notifications::APPP_KEY');
     966        $ap3_ion_theme = self::ap3_ion_theme_edd_exists();
     967        if ($app_camera || $app_commerce || $app_community || $app_lms || $app_push || $ap3_ion_theme) {
     968        ?>
     969            <div class="notice notice-warning">
     970                <p><?php _e('You are currently using legacy versions of the following AppPresser extensions. These extensions will no longer receive updates so we strongly urge you to contact us via <a href="mailto:[email protected]">[email protected]</a> to ensure you continue to have access to future updates.', 'my-text-domain'); ?></p>
     971                <ul style="list-style: initial;padding: revert;">
     972                    <?php if ($app_camera) : ?>
     973                        <li>AppCamera</li>
     974                    <?php endif; ?>
     975                    <?php if ($app_commerce) : ?>
     976                        <li>AppCommerce</li>
     977                    <?php endif; ?>
     978                    <?php if ($app_community) : ?>
     979                        <li>AppCommunity</li>
     980                    <?php endif; ?>
     981                    <?php if ($app_lms) : ?>
     982                        <li>AppLMS</li>
     983                    <?php endif; ?>
     984                    <?php if ($app_push) : ?>
     985                        <li>AppPush</li>
     986                    <?php endif; ?>
     987                    <?php if ($ap3_ion_theme) : ?>
     988                        <li>AP3 Ion Theme</li>
     989                    <?php endif; ?>
     990                </ul>
     991            </div>
     992        <?php
     993        }
     994    }
     995
     996    public static function ap3_ion_theme_edd_exists()
     997    {
     998        $theme_name = 'ap3-ion-theme';
     999        $class_file = 'inc/classes/AppPresser_AP3_Customizer.php';
     1000        // Check if the theme exists
     1001        $theme = wp_get_theme($theme_name);
     1002        if ($theme->exists()) {
     1003            // Build the file path
     1004            $theme_root = get_theme_root() . '/' . $theme_name;
     1005            $file_path = $theme_root . '/' . $class_file;
     1006            if (file_exists($file_path)) {
     1007                return true;
     1008            }
     1009        }
     1010
     1011        return false;
     1012    }
    13251013
    13261014    public static function set_deprecate_version( $deprecate_ver = null ) {
  • apppresser/trunk/inc/AppPresser_Plugin_Updater.php

    r2256866 r3216437  
    9696
    9797        public function add_update_filters() {
    98             add_filter( 'site_transient_update_plugins', array( $this, 'filter_update_plugins' ) );
     98            add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'filter_update_plugins' ) );
    9999            add_filter( 'transient_update_plugins', array( $this, 'filter_update_plugins' ) );
    100100        }
  • apppresser/trunk/readme.txt

    r3202388 r3216437  
    55Requires at least: 4.7.0
    66Tested up to: 6.7
    7 Stable tag: 4.4.8
     7Stable tag: 4.4.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747
    4848== Changelog ==
     49
     50= 4.4.9 =
     51* Removed deprecated functionalities
     52* Add an admin notice for legacy extensions
     53* Improved the AppPresser plugin updater
    4954
    5055= 4.4.8 =
Note: See TracChangeset for help on using the changeset viewer.