Changeset 2873186
- Timestamp:
- 03/01/2023 06:01:15 PM (3 years ago)
- Location:
- constellation-client-portal/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (2 diffs)
-
admin/class-ars-constellation-client-portal-client-pages.php (modified) (3 diffs)
-
admin/class-ars-constellation-client-portal-company.php (modified) (2 diffs)
-
ars-constellation-client-portal.php (modified) (2 diffs)
-
includes/class-ars-constellation-client-portal-activator.php (modified) (1 diff)
-
includes/class-ars-constellation-client-portal-deactivator.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
constellation-client-portal/trunk/README.txt
r2862820 r2873186 5 5 Requires at least: 5.0.0 6 6 Tested up to: 6.1 7 Stable tag: 1.5. 07 Stable tag: 1.5.5 8 8 Requires PHP: 7.4 9 9 License: GPLv3 or later … … 203 203 204 204 == 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 205 214 = 1.5.4 (Pro) - 2023-2-9 = 206 215 * Update: Corrected typo in the pro email settings section. -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-client-pages.php
r2663884 r2873186 71 71 ); 72 72 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 73 80 $args = array( 74 81 'labels' => $labels, 75 82 'hierarchical' => true, 76 83 'supports' => array( 'title', 'author', 'editor', 'page-attributes', 'thumbnail' ), 77 'show_in_rest' => true,84 'show_in_rest' => $show_in_rest, 78 85 'taxonomies' => array( 'accp_client_page_categories', 'accp_client_page_tags' ), 79 86 'public' => true, … … 87 94 'can_export' => true, 88 95 'rewrite' => array('slug' => 'accp-client-page'), 89 /*'capabilities' => array(96 'capabilities' => array( 90 97 'edit_post' => 'update_core', 91 98 'edit_posts' => 'update_core', … … 96 103 'delete_post' => 'update_core', 97 104 'delete_posts' => 'update_core' 98 ), */105 ), 99 106 ); 100 107 101 108 register_post_type( 'accp_client_pages', $args ); 109 102 110 } 103 111 -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-company.php
r2845715 r2873186 72 72 ); 73 73 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 74 81 $args = array( 75 82 'labels' => $labels, … … 77 84 'supports' => array( 'title', 'author', 'editor', 'thumbnail', 'excerpt' ), 78 85 'taxonomies' => array( 'accp_client_company_categories' ), 79 'show_in_rest' => true,86 'show_in_rest' => $show_in_rest, 80 87 'public' => true, 81 88 'show_ui' => true, -
constellation-client-portal/trunk/ars-constellation-client-portal.php
r2862820 r2873186 5 5 * Plugin URI: https://adrianrodriguezstudios.com/constellation-client-portal/ 6 6 * 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. 47 * Version: 1.5.5 8 8 * Author: ARS 9 9 * Author URI: https://adrianrodriguezstudios.com … … 41 41 */ 42 42 define('ACCP_PLUGIN_NAME', 'ARS_CONSTELLATION_CLIENT_PORTAL'); 43 define('ACCP_PLUGIN_VERSION', '1.5. 4'); // Change the version in the header as well.43 define('ACCP_PLUGIN_VERSION', '1.5.5'); // Change the version in the header as well. 44 44 define( ACCP_PLUGIN_NAME, ACCP_PLUGIN_VERSION ); 45 45 -
constellation-client-portal/trunk/includes/class-ars-constellation-client-portal-activator.php
r2663884 r2873186 16 16 public static function activate() { 17 17 18 // Flush rewrite rules after they are inited 18 /** 19 * Add plugin activation options to trigger 20 * plugin initialization functions. 21 */ 19 22 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 } 20 47 21 } 48 } 22 49 23 } 50 } // END ARS_Constellation_Client_Portal_Activator -
constellation-client-portal/trunk/includes/class-ars-constellation-client-portal-deactivator.php
r2845715 r2873186 24 24 public static function deactivate() { 25 25 26 // Flush the rewrite rules 27 global $wp, $wp_rewrite; 26 /** 27 * Flush the rewrite rules 28 */ 29 flush_rewrite_rules(); 28 30 29 delete_option( 'rewrite_rules' );30 31 31 32 /** 32 33 * Clear the automated email cron job if it is scheduled. 33 34 */ 34 if ( !wp_next_scheduled('accp_automated_email_cron') ) {35 if ( wp_next_scheduled('accp_automated_email_cron') ) { 35 36 36 37 wp_clear_scheduled_hook( 'accp_automated_email_cron' ); … … 38 39 } 39 40 40 41 /**42 * Clear the automated email cron job if no43 * 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 49 41 } 50 42
Note: See TracChangeset
for help on using the changeset viewer.