Plugin Directory

Changeset 2873186


Ignore:
Timestamp:
03/01/2023 06:01:15 PM (3 years ago)
Author:
arstudios
Message:

Release 1.5.5.

Location:
constellation-client-portal/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • constellation-client-portal/trunk/README.txt

    r2862820 r2873186  
    55Requires at least: 5.0.0
    66Tested up to: 6.1
    7 Stable tag: 1.5.0
     7Stable tag: 1.5.5
    88Requires PHP: 7.4
    99License: GPLv3 or later
     
    203203
    204204== Changelog ==
     205= 1.5.5 (Pro) - 2023-3-1 =
     206* Improvement: Updated the plugin activation functionality to check for active scheduled emails and reschedule the accp_automated_email_cron cron job on plugin activation if any are enabled.
     207* Improvement: Updated the plugin deactivation accp_automated_email_cron cron unschedule functionality.
     208
     209= 1.5.5 (Core) - 2023-3-1 =
     210* Improvement: Updated the plugin deactivation flush rewrite functionality.
     211* Improvement: Updated the accp_client_pages post type capabilities to require admin capabilities to view, edit, and delete in WP Admin.
     212* Improvement: Added functionality to check user capabilities and enable show_in_rest for accp_clientcompany and accp_client_pages post types for admins (to enable Gutenberg support), but disable public access to these post types via the REST API.
     213
    205214= 1.5.4 (Pro) - 2023-2-9 =
    206215* Update: Corrected typo in the pro email settings section.
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-client-pages.php

    r2663884 r2873186  
    7171        );
    7272
     73        /**
     74         * Only show the post type in rest if the user has sufficient
     75         * capabilities.  We want to enable show_in_rest to allow Gutenberg support,
     76         * without allowing public access to the post type via the WP REST API.
     77         */
     78        $show_in_rest = current_user_can( 'manage_options' ) ? true : false;
     79
    7380        $args = array(
    7481            'labels' => $labels,
    7582            'hierarchical' => true,
    7683            'supports' => array( 'title', 'author', 'editor', 'page-attributes', 'thumbnail' ),
    77             'show_in_rest' => true,
     84            'show_in_rest' => $show_in_rest,
    7885            'taxonomies' => array( 'accp_client_page_categories', 'accp_client_page_tags' ),
    7986            'public' => true,
     
    8794            'can_export' => true,
    8895            'rewrite' => array('slug' => 'accp-client-page'),
    89             /*'capabilities' => array(
     96            'capabilities' => array(
    9097                'edit_post' => 'update_core',
    9198                'edit_posts' => 'update_core',
     
    96103                'delete_post' => 'update_core',
    97104                'delete_posts' => 'update_core'
    98             ),*/           
     105            ),     
    99106        );
    100107
    101108        register_post_type( 'accp_client_pages', $args );
     109       
    102110    }
    103111
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-company.php

    r2845715 r2873186  
    7272        );
    7373
     74        /**
     75         * Only show the post type in rest if the user has sufficient
     76         * capabilities.  We want to enable show_in_rest to allow Gutenberg support,
     77         * without allowing public access to the post type via the WP REST API.
     78         */
     79        $show_in_rest = current_user_can( 'manage_options' ) ? true : false;
     80
    7481        $args = array(
    7582            'labels' => $labels,
     
    7784            'supports' => array( 'title', 'author', 'editor', 'thumbnail', 'excerpt' ),
    7885            'taxonomies' => array( 'accp_client_company_categories' ),
    79             'show_in_rest' => true,
     86            'show_in_rest' => $show_in_rest,
    8087            'public' => true,
    8188            'show_ui' => true,
  • constellation-client-portal/trunk/ars-constellation-client-portal.php

    r2862820 r2873186  
    55 * Plugin URI:        https://adrianrodriguezstudios.com/constellation-client-portal/
    66 * Description:       Create private pages for each of your clients, post private files, and protect your client files from unauthorized users and search engines.  <strong>Important:</strong> All Site-level File Protection features will cease to function if the plugin is disabled or uninstalled.
    7  * Version:           1.5.4
     7 * Version:           1.5.5
    88 * Author:            ARS
    99 * Author URI:        https://adrianrodriguezstudios.com
     
    4141 */
    4242define('ACCP_PLUGIN_NAME', 'ARS_CONSTELLATION_CLIENT_PORTAL');
    43 define('ACCP_PLUGIN_VERSION', '1.5.4'); // Change the version in the header as well.
     43define('ACCP_PLUGIN_VERSION', '1.5.5'); // Change the version in the header as well.
    4444define( ACCP_PLUGIN_NAME, ACCP_PLUGIN_VERSION );
    4545
  • constellation-client-portal/trunk/includes/class-ars-constellation-client-portal-activator.php

    r2663884 r2873186  
    1616    public static function activate() {     
    1717
    18         // Flush rewrite rules after they are inited
     18        /**
     19         * Add plugin activation options to trigger
     20         * plugin initialization functions.
     21         */
    1922        add_option( 'accp_plugin_activation','just-activated' );
     23
     24        /**
     25         * Check for enabled scheduled emails, and schedule
     26         * the cron job if needed.
     27         */
     28        if( class_exists('ARS_Constellation_Client_Portal_Pro_Email')){         
     29
     30            $pro_emails = new ARS_Constellation_Client_Portal_Pro_Email(ACCP_PLUGIN_VERSION, ACCP_PLUGIN_NAME);
     31
     32            $enabled_options = $pro_emails->accp_get_enabled_automated_email_option_names();       
     33                   
     34            if(!empty($enabled_options) && $enabled_options !== false){
     35
     36                if ( !wp_next_scheduled('accp_automated_email_cron') ) {               
     37
     38                    $schedule = 'twicedaily';                                       
     39
     40                    wp_schedule_event( time(), $schedule, 'accp_automated_email_cron' );               
     41
     42                }
     43
     44            }
     45
     46        }       
    2047       
    21     }   
     48    }
    2249   
    23 }
     50} // END ARS_Constellation_Client_Portal_Activator
  • constellation-client-portal/trunk/includes/class-ars-constellation-client-portal-deactivator.php

    r2845715 r2873186  
    2424    public static function deactivate() {
    2525
    26         // Flush the rewrite rules
    27         global $wp, $wp_rewrite;       
     26        /**
     27         * Flush the rewrite rules
     28         */
     29        flush_rewrite_rules();
    2830
    29         delete_option( 'rewrite_rules' );
    3031
    3132        /**
    3233         * Clear the automated email cron job if it is scheduled.
    3334         */
    34         if ( !wp_next_scheduled('accp_automated_email_cron') ) {           
     35        if ( wp_next_scheduled('accp_automated_email_cron') ) {         
    3536
    3637            wp_clear_scheduled_hook( 'accp_automated_email_cron' );
     
    3839        }
    3940
    40 
    41         /**
    42          * Clear the  automated email cron job if no
    43          * automated emails are enabled.
    44          */
    45         if ( wp_next_scheduled('accp_automated_email_cron') ) {
    46             wp_clear_scheduled_hook( 'accp_automated_email_cron' );
    47         }
    48 
    4941    }
    5042
Note: See TracChangeset for help on using the changeset viewer.