Changeset 3067786
- Timestamp:
- 04/09/2024 04:01:49 PM (23 months ago)
- Location:
- constellation-client-portal
- Files:
-
- 131 added
- 1 deleted
- 8 edited
-
tags/1.8.0 (deleted)
-
tags/1.8.2 (added)
-
tags/1.8.2/LICENSE.txt (added)
-
tags/1.8.2/README.txt (added)
-
tags/1.8.2/admin (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-admin.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-client-pages.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-company.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-core-authorization.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-core-file-checks.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-file.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-invoice.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-settings.php (added)
-
tags/1.8.2/admin/class-ars-constellation-client-portal-users.php (added)
-
tags/1.8.2/admin/css (added)
-
tags/1.8.2/admin/css/ars-constellation-client-portal-admin.css (added)
-
tags/1.8.2/admin/css/jquery-ui (added)
-
tags/1.8.2/admin/css/jquery-ui/1.11.1 (added)
-
tags/1.8.2/admin/css/jquery-ui/1.11.1/themes (added)
-
tags/1.8.2/admin/css/jquery-ui/1.11.1/themes/cupertino (added)
-
tags/1.8.2/admin/css/jquery-ui/1.11.1/themes/cupertino/jquery-ui.css (added)
-
tags/1.8.2/admin/css/select2.min.css (added)
-
tags/1.8.2/admin/index.php (added)
-
tags/1.8.2/admin/js (added)
-
tags/1.8.2/admin/js/ars-constellation-client-portal-admin.js (added)
-
tags/1.8.2/admin/js/i18n (added)
-
tags/1.8.2/admin/js/i18n/af.js (added)
-
tags/1.8.2/admin/js/i18n/ar.js (added)
-
tags/1.8.2/admin/js/i18n/az.js (added)
-
tags/1.8.2/admin/js/i18n/bg.js (added)
-
tags/1.8.2/admin/js/i18n/bs.js (added)
-
tags/1.8.2/admin/js/i18n/ca.js (added)
-
tags/1.8.2/admin/js/i18n/cs.js (added)
-
tags/1.8.2/admin/js/i18n/da.js (added)
-
tags/1.8.2/admin/js/i18n/de.js (added)
-
tags/1.8.2/admin/js/i18n/dsb.js (added)
-
tags/1.8.2/admin/js/i18n/el.js (added)
-
tags/1.8.2/admin/js/i18n/en.js (added)
-
tags/1.8.2/admin/js/i18n/es.js (added)
-
tags/1.8.2/admin/js/i18n/et.js (added)
-
tags/1.8.2/admin/js/i18n/eu.js (added)
-
tags/1.8.2/admin/js/i18n/fa.js (added)
-
tags/1.8.2/admin/js/i18n/fi.js (added)
-
tags/1.8.2/admin/js/i18n/fr.js (added)
-
tags/1.8.2/admin/js/i18n/gl.js (added)
-
tags/1.8.2/admin/js/i18n/he.js (added)
-
tags/1.8.2/admin/js/i18n/hi.js (added)
-
tags/1.8.2/admin/js/i18n/hr.js (added)
-
tags/1.8.2/admin/js/i18n/hsb.js (added)
-
tags/1.8.2/admin/js/i18n/hu.js (added)
-
tags/1.8.2/admin/js/i18n/hy.js (added)
-
tags/1.8.2/admin/js/i18n/id.js (added)
-
tags/1.8.2/admin/js/i18n/is.js (added)
-
tags/1.8.2/admin/js/i18n/it.js (added)
-
tags/1.8.2/admin/js/i18n/ja.js (added)
-
tags/1.8.2/admin/js/i18n/km.js (added)
-
tags/1.8.2/admin/js/i18n/ko.js (added)
-
tags/1.8.2/admin/js/i18n/lt.js (added)
-
tags/1.8.2/admin/js/i18n/lv.js (added)
-
tags/1.8.2/admin/js/i18n/mk.js (added)
-
tags/1.8.2/admin/js/i18n/ms.js (added)
-
tags/1.8.2/admin/js/i18n/nb.js (added)
-
tags/1.8.2/admin/js/i18n/nl.js (added)
-
tags/1.8.2/admin/js/i18n/pl.js (added)
-
tags/1.8.2/admin/js/i18n/ps.js (added)
-
tags/1.8.2/admin/js/i18n/pt-BR.js (added)
-
tags/1.8.2/admin/js/i18n/pt.js (added)
-
tags/1.8.2/admin/js/i18n/ro.js (added)
-
tags/1.8.2/admin/js/i18n/ru.js (added)
-
tags/1.8.2/admin/js/i18n/sk.js (added)
-
tags/1.8.2/admin/js/i18n/sl.js (added)
-
tags/1.8.2/admin/js/i18n/sr-Cyrl.js (added)
-
tags/1.8.2/admin/js/i18n/sr.js (added)
-
tags/1.8.2/admin/js/i18n/sv.js (added)
-
tags/1.8.2/admin/js/i18n/th.js (added)
-
tags/1.8.2/admin/js/i18n/tr.js (added)
-
tags/1.8.2/admin/js/i18n/uk.js (added)
-
tags/1.8.2/admin/js/i18n/vi.js (added)
-
tags/1.8.2/admin/js/i18n/zh-CN.js (added)
-
tags/1.8.2/admin/js/i18n/zh-TW.js (added)
-
tags/1.8.2/admin/js/select2.full.min.js (added)
-
tags/1.8.2/admin/js/select2.min.js (added)
-
tags/1.8.2/ars-constellation-client-portal.php (added)
-
tags/1.8.2/assets (added)
-
tags/1.8.2/assets/css (added)
-
tags/1.8.2/assets/css/font-awesome (added)
-
tags/1.8.2/assets/css/font-awesome/css (added)
-
tags/1.8.2/assets/css/font-awesome/css/all.css (added)
-
tags/1.8.2/assets/css/font-awesome/css/all.min.css (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-brands-400.eot (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-brands-400.svg (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-brands-400.ttf (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-brands-400.woff (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-brands-400.woff2 (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-regular-400.eot (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-regular-400.svg (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-regular-400.ttf (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-regular-400.woff (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-regular-400.woff2 (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-solid-900.eot (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-solid-900.svg (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-solid-900.ttf (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-solid-900.woff (added)
-
tags/1.8.2/assets/css/font-awesome/webfonts/fa-solid-900.woff2 (added)
-
tags/1.8.2/assets/img (added)
-
tags/1.8.2/assets/img/accp-full-logo.png (added)
-
tags/1.8.2/includes (added)
-
tags/1.8.2/includes/ars-constellation-client-portal-install-uninstall.php (added)
-
tags/1.8.2/includes/class-ars-constellation-client-portal-activator.php (added)
-
tags/1.8.2/includes/class-ars-constellation-client-portal-deactivator.php (added)
-
tags/1.8.2/includes/class-ars-constellation-client-portal-i18n.php (added)
-
tags/1.8.2/includes/class-ars-constellation-client-portal-loader.php (added)
-
tags/1.8.2/includes/class-ars-constellation-client-portal-utility-functions.php (added)
-
tags/1.8.2/includes/class-ars-constellation-client-portal.php (added)
-
tags/1.8.2/includes/index.php (added)
-
tags/1.8.2/index.php (added)
-
tags/1.8.2/languages (added)
-
tags/1.8.2/languages/ars-constellation-client-portal.pot (added)
-
tags/1.8.2/public (added)
-
tags/1.8.2/public/assets (added)
-
tags/1.8.2/public/assets/index.php (added)
-
tags/1.8.2/public/class-ars-constellation-client-portal-public.php (added)
-
tags/1.8.2/public/css (added)
-
tags/1.8.2/public/css/ars-constellation-client-portal-list-shortcode-styles.css (added)
-
tags/1.8.2/public/css/ars-constellation-client-portal-public.css (added)
-
tags/1.8.2/public/index.php (added)
-
tags/1.8.2/public/js (added)
-
tags/1.8.2/public/js/ars-constellation-client-portal-public.js (added)
-
tags/1.8.2/public/shortcodes (added)
-
tags/1.8.2/public/shortcodes/class-ars-constellation-client-portal-list-shortcodes.php (added)
-
tags/1.8.2/uninstall.php (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/admin/class-ars-constellation-client-portal-admin.php (modified) (8 diffs)
-
trunk/admin/class-ars-constellation-client-portal-client-pages.php (modified) (13 diffs)
-
trunk/admin/class-ars-constellation-client-portal-company.php (modified) (3 diffs)
-
trunk/admin/class-ars-constellation-client-portal-settings.php (modified) (9 diffs)
-
trunk/ars-constellation-client-portal.php (modified) (5 diffs)
-
trunk/public/index.php (modified) (1 diff)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
constellation-client-portal/trunk/README.txt
r3062211 r3067786 4 4 Tags: client portal, private files, private pages, private posts, customer portal, business portal, invoicing, business managemenet, client management 5 5 Requires at least: 5.0.0 6 Tested up to: 6. 47 Stable tag: 1.8. 16 Tested up to: 6.5 7 Stable tag: 1.8.2 8 8 Requires PHP: 7.4 9 9 License: GPLv3 or later … … 206 206 207 207 == Changelog == 208 = 1.8.2 (Pro) - 2024-4-9 = 209 * Improvement: Constrained the Quick Create initialize editor function to only fire on necessary admin pages. 210 * Fix: Fixed save_post issue preventing pages and posts from be saved. 211 212 = 1.8.2 (Core) - 2024-4-9 = 213 * Compatibility: WordPress 6.5 compatibility check. 214 * Update: Began code formatting updates to conform code to WordPress coding standards. 215 208 216 = 1.8.1 (Pro) - 2024-4-1 = 209 217 * Update: Made the bulk create and export sections responsive. … … 246 254 * Improvement: Improved the client page, client invoice, and client file meta save functionality. 247 255 * Improvement: Improved capability checks and sanitization for the excluded user and excluded role sections for pages and posts. 248 * Improvement: Updated the functionality that saves the accp_client_file_categories, accp_client_invoice_categories, and accp_client_page_categories exclude user and exclude role taxonomy meta data better organization and maintainability.256 * Improvement: Updated the functionality that saves the accp_client_file_categories, accp_client_invoice_categories, and accp_client_page_categories exclude user and exclude role taxonomy meta data for better organization and maintainability. 249 257 * Improvement: Updated the functionality that adds the exclude user and exclude role sections to the accp_client_file_categories, accp_client_invoice_categories, and accp_client_page_categories edit taxonomy page for better organization and maintainability. 250 258 * Improvement: Updated the functionality that adds the exclude user and exclude role sections to the accp_client_file_categories, accp_client_invoice_categories, and accp_client_page_categories add taxonomy form for better organization and maintainability. -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-admin.php
r3062211 r3067786 18 18 } 19 19 20 /** 21 * ARS_Constellation_Client_Portal_Admin Class. 22 */ 20 23 class ARS_Constellation_Client_Portal_Admin { 21 24 … … 75 78 */ 76 79 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/ars-constellation-client-portal-admin.css', array(), $this->version, 'all' ); 77 wp_enqueue_style( $this->plugin_name.'-jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui/1.11.1/themes/cupertino/jquery-ui.css', array(), $this->version, 'all' ); 78 79 wp_enqueue_style( $this->plugin_name.'-selec2-css', plugin_dir_url( __FILE__ ) . 'css/select2.min.css', array(), $this->version, 'all' ); 80 80 wp_enqueue_style( $this->plugin_name.'-jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui/1.11.1/themes/cupertino/jquery-ui.css', array(), $this->version, 'all' ); 81 82 wp_enqueue_style( $this->plugin_name.'-selec2-css', plugin_dir_url( __FILE__ ) . 'css/select2.min.css', array(), $this->version, 'all' ); 83 81 84 /** 82 85 * Conditionally enqueue Font Awesome CSS. 83 86 */ 84 87 if( !wp_style_is('font-awesome', 'registered') ){ 85 88 86 89 wp_enqueue_style( 'accp-font-awesome-css', dirname( plugin_dir_url( __FILE__ ) ) . '/assets/css/font-awesome/css/all.min.css', array(), $this->version, 'all' ); 87 90 … … 196 199 * Parse ACCP query_vars and 197 200 * handle actions. 201 * 202 * @param object $wp - The WP object. 198 203 */ 199 204 function accp_parse_request( &$wp ){ … … 708 713 $nonce = filter_var($_POST['bulk_delete_nonce'], FILTER_SANITIZE_STRING); 709 714 710 if ( ! wp_verify_nonce( $nonce, 'clientfile_admin_nonce' ) )711 die ();715 if ( ! wp_verify_nonce( $nonce, 'clientfile_admin_nonce' ) ) 716 die(); 712 717 713 718 $file_ids = json_decode( stripslashes($_POST['del_file_post_id_json']) ); // Sanitize in loop. … … 1966 1971 function accp_save_post($post_id, $post = null){ 1967 1972 1968 if( !is_user_logged_in() || !is_admin())1973 if( !is_user_logged_in() ) 1969 1974 return wp_die('Invalid command.'); 1970 1975 … … 2093 2098 * Save uploaded file info to post meta. 2094 2099 */ 2095 update_post_meta($post_id, 'accp_file', $upload); 2096 2097 2098 /** 2099 * Add index.php (silence is golden) to the respective 2100 * company directory if it doesn't already exist. 2101 */ 2102 $this->copy_index_file_to_company_dir($post_id); 2103 2100 update_post_meta($post_id, 'accp_file', $upload); 2104 2101 2105 2102 /** … … 2109 2106 * if the file has changed (i.e. new file upload or updated file upload). 2110 2107 */ 2111 //do_action('accp_after_file_upload', $post_id, $company_id); 2108 //do_action('accp_after_file_upload', $post_id, $company_id); 2109 2110 2111 2112 /** 2113 * Add index.php (silence is golden) to the respective 2114 * company directory if it doesn't already exist. 2115 */ 2116 $this->copy_index_file_to_company_dir($post_id); 2112 2117 2113 2118 … … 2116 2121 * client portal uploads dir if needed. 2117 2122 */ 2118 $this->copy_index_file_to_uploads_dir($post_id); 2123 $this->copy_index_file_to_uploads_dir($post_id); 2119 2124 2120 2125 } -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-client-pages.php
r3062211 r3067786 7 7 * @author Adrian Rodriguez 8 8 * @since 1.0.0 9 * 9 * 10 10 * Client Pages (accp_client_pages) post type admin specific functionality. 11 11 */ … … 18 18 } 19 19 20 21 /** 22 * ARS_Constellation_Client_Portal_Client_Pages Class. 23 */ 20 24 class ARS_Constellation_Client_Portal_Client_Pages { 21 25 … … 42 46 * 43 47 * @since 1.0.0 44 * @param string$plugin_name The name of this plugin.45 * @param string$version The version of this plugin.48 * @param string $plugin_name The name of this plugin. 49 * @param string $version The version of this plugin. 46 50 */ 47 51 public function __construct( $plugin_name, $version ) { 48 52 49 53 $this->plugin_name = $plugin_name; 50 $this->version = $version; 51 $this->utilities = new ACCP_Utility_Functions($this->plugin_name, $this->version); 52 $this->admin = new ARS_Constellation_Client_Portal_Admin($this->plugin_name, $this->version); 53 54 if( class_exists('ARS_Constellation_Client_Portal_Pro_Admin') ){ 55 56 $this->pro_admin = new ARS_Constellation_Client_Portal_Pro_Admin($this->plugin_name, $this->version); 57 58 } 59 54 $this->version = $version; 55 $this->utilities = new ACCP_Utility_Functions( $this->plugin_name, $this->version ); 56 $this->admin = new ARS_Constellation_Client_Portal_Admin( $this->plugin_name, $this->version ); 57 58 if ( class_exists( 'ARS_Constellation_Client_Portal_Pro_Admin' ) ) { 59 60 $this->pro_admin = new ARS_Constellation_Client_Portal_Pro_Admin( $this->plugin_name, $this->version ); 61 62 } 60 63 } 61 64 … … 65 68 * 66 69 * @since 1.0.0 67 */ 68 public function accp_register_client_pages_post_type() { 69 70 $labels = array( 71 'name'=> _x( 'Client Pages', 'constellation-client-portal' ),72 'singular_name'=> _x( 'Client Page', 'constellation-client-portal' ),73 'add_new'=> _x( 'Add New', 'constellation-client-portal' ),74 'add_new_item'=> _x( 'Add New Client Page', 'constellation-client-portal' ),75 'edit_item'=> _x( 'Edit Client Page', 'constellation-client-portal' ),76 'new_item'=> _x( 'New Client Page', 'constellation-client-portal' ),77 'view_item'=> _x( 'View Client Page', 'constellation-client-portal' ),78 'search_items'=> _x( 'Search Client Pages', 'constellation-client-portal' ),79 'not_found'=> _x( 'No client pages found', 'constellation-client-portal' ),80 'not_found_in_trash' => _x( 'No client pages found in Trash', 'constellation-client-portal' ),81 'parent_item_colon'=> _x( 'Parent Client Page:', 'constellation-client-portal' ),82 'menu_name'=> _x( 'Client Pages', 'constellation-client-portal' ),83 ); 84 85 /** 86 * Only show the post type in rest if the user has sufficient 70 */ 71 public function accp_register_client_pages_post_type() { 72 73 $labels = array( 74 'name' => _x( 'Client Pages', 'constellation-client-portal' ), 75 'singular_name' => _x( 'Client Page', 'constellation-client-portal' ), 76 'add_new' => _x( 'Add New', 'constellation-client-portal' ), 77 'add_new_item' => _x( 'Add New Client Page', 'constellation-client-portal' ), 78 'edit_item' => _x( 'Edit Client Page', 'constellation-client-portal' ), 79 'new_item' => _x( 'New Client Page', 'constellation-client-portal' ), 80 'view_item' => _x( 'View Client Page', 'constellation-client-portal' ), 81 'search_items' => _x( 'Search Client Pages', 'constellation-client-portal' ), 82 'not_found' => _x( 'No client pages found', 'constellation-client-portal' ), 83 'not_found_in_trash' => _x( 'No client pages found in Trash', 'constellation-client-portal' ), 84 'parent_item_colon' => _x( 'Parent Client Page:', 'constellation-client-portal' ), 85 'menu_name' => _x( 'Client Pages', 'constellation-client-portal' ), 86 ); 87 88 /** 89 * Only show the post type in rest if the user has sufficient 87 90 * capabilities. We want to enable show_in_rest to allow Gutenberg support, 88 91 * without allowing public access to the post type via the WP REST API. 89 92 */ 90 93 $show_in_rest = current_user_can( 'manage_options' ) ? true : false; 91 92 94 93 95 /** 94 96 * Allow custom rewrite slug. 95 97 */ 96 if ( true === $this->utilities->is_pro_plugin($this->plugin_name) ){98 if ( true === $this->utilities->is_pro_plugin( $this->plugin_name ) ) { 97 99 98 100 $rewrite_slug = $this->pro_admin->get_client_page_rewrite_slug(); 99 101 100 } else{102 } else { 101 103 102 104 $rewrite_slug = 'accp-client-page'; 103 105 104 } 105 106 $args = array( 107 'labels'=> $labels,108 'hierarchical'=> true,109 'supports'=> array( 'title', 'author', 'editor', 'page-attributes', 'thumbnail' ),110 'show_in_rest'=> $show_in_rest,111 'taxonomies'=> array( 'accp_client_page_categories', 'accp_client_page_tags' ),112 'public'=> true,113 'show_ui'=> true,114 'show_in_menu'=> true,115 'show_in_nav_menus'=> false,116 'publicly_queryable'=> true,117 'exclude_from_search' => true,118 'has_archive'=> false,119 'query_var'=> true,120 'can_export'=> true,121 'rewrite' => array('slug' => $rewrite_slug),122 'capabilities'=> array(123 'edit_post'=> 'manage_options',124 'edit_posts'=> 'manage_options',125 'edit_others_posts'=> 'manage_options',126 'publish_posts'=> 'manage_options',127 'read_post'=> 'manage_options',128 'read_private_posts' => 'manage_options',129 'delete_post'=> 'manage_options',130 'delete_posts' => 'manage_options'131 ),106 } 107 108 $args = array( 109 'labels' => $labels, 110 'hierarchical' => true, 111 'supports' => array( 'title', 'author', 'editor', 'page-attributes', 'thumbnail' ), 112 'show_in_rest' => $show_in_rest, 113 'taxonomies' => array( 'accp_client_page_categories', 'accp_client_page_tags' ), 114 'public' => true, 115 'show_ui' => true, 116 'show_in_menu' => true, 117 'show_in_nav_menus' => false, 118 'publicly_queryable' => true, 119 'exclude_from_search' => true, 120 'has_archive' => false, 121 'query_var' => true, 122 'can_export' => true, 123 'rewrite' => array( 'slug' => $rewrite_slug ), 124 'capabilities' => array( 125 'edit_post' => 'manage_options', 126 'edit_posts' => 'manage_options', 127 'edit_others_posts' => 'manage_options', 128 'publish_posts' => 'manage_options', 129 'read_post' => 'manage_options', 130 'read_private_posts' => 'manage_options', 131 'delete_post' => 'manage_options', 132 'delete_posts' => 'manage_options', 133 ), 132 134 ); 133 135 134 136 register_post_type( 'accp_client_pages', $args ); 135 136 } 137 137 } 138 138 139 139 140 /** … … 144 145 public function accp_register_taxonomy_client_page_categories() { 145 146 146 $labels = array( 147 'name'=> _x( 'Client Page Categories', 'constellation-client-portal' ),148 'singular_name'=> _x( 'Client Page Category', 'constellation-client-portal' ),149 'search_items'=> _x( 'Search Categories', 'constellation-client-portal' ),150 'popular_items'=> _x( 'Popular Categories', 'constellation-client-portal' ),151 'all_items'=> _x( 'All Categories', 'constellation-client-portal' ),152 'parent_item'=> _x( 'Parent Category', 'constellation-client-portal' ),153 'parent_item_colon'=> _x( 'Parent Category:', 'constellation-client-portal' ),154 'edit_item'=> _x( 'Edit Category', 'constellation-client-portal' ),155 'update_item'=> _x( 'Update Category', 'constellation-client-portal' ),156 'add_new_item'=> _x( 'Add New Category', 'constellation-client-portal' ),157 'new_item_name'=> _x( 'New Category', 'constellation-client-portal' ),158 'separate_items_with_commas' => _x( 'Separate categories with commas', 'constellation-client-portal' ),159 'add_or_remove_items'=> _x( 'Add or remove categories', 'constellation-client-portal' ),160 'choose_from_most_used'=> _x( 'Choose from the most used categories', 'constellation-client-portal' ),161 'menu_name'=> _x( 'Client Page Categories', 'constellation-client-portal' ),162 ); 163 164 /** 165 * Only show the post type in rest if the user has sufficient 147 $labels = array( 148 'name' => _x( 'Client Page Categories', 'constellation-client-portal' ), 149 'singular_name' => _x( 'Client Page Category', 'constellation-client-portal' ), 150 'search_items' => _x( 'Search Categories', 'constellation-client-portal' ), 151 'popular_items' => _x( 'Popular Categories', 'constellation-client-portal' ), 152 'all_items' => _x( 'All Categories', 'constellation-client-portal' ), 153 'parent_item' => _x( 'Parent Category', 'constellation-client-portal' ), 154 'parent_item_colon' => _x( 'Parent Category:', 'constellation-client-portal' ), 155 'edit_item' => _x( 'Edit Category', 'constellation-client-portal' ), 156 'update_item' => _x( 'Update Category', 'constellation-client-portal' ), 157 'add_new_item' => _x( 'Add New Category', 'constellation-client-portal' ), 158 'new_item_name' => _x( 'New Category', 'constellation-client-portal' ), 159 'separate_items_with_commas' => _x( 'Separate categories with commas', 'constellation-client-portal' ), 160 'add_or_remove_items' => _x( 'Add or remove categories', 'constellation-client-portal' ), 161 'choose_from_most_used' => _x( 'Choose from the most used categories', 'constellation-client-portal' ), 162 'menu_name' => _x( 'Client Page Categories', 'constellation-client-portal' ), 163 ); 164 165 /** 166 * Only show the post type in rest if the user has sufficient 166 167 * capabilities. We want to enable show_in_rest to allow Gutenberg support, 167 168 * without allowing public access to the post type via the WP REST API. … … 172 173 * Allow custom rewrite slug. 173 174 */ 174 if ( true === $this->utilities->is_pro_plugin($this->plugin_name) ){175 if ( true === $this->utilities->is_pro_plugin( $this->plugin_name ) ) { 175 176 176 177 $rewrite_slug = $this->pro_admin->get_client_page_categories_rewrite_slug(); 177 178 178 } else{179 } else { 179 180 180 181 $rewrite_slug = false; … … 182 183 } 183 184 184 $args = array( 185 'labels'=> $labels,186 'public'=> true,187 'show_in_rest' => $show_in_rest,188 'show_in_nav_menus' => false,189 'show_ui'=> true,190 'show_tagcloud'=> false,191 'hierarchical'=> true,192 'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,193 'query_var'=> true,194 'capabilities' => array(195 'manage_terms' => 'manage_options',196 'edit_terms'=> 'manage_options',197 'delete_terms' => 'manage_options',198 'assign_terms' => 'manage_options',199 ),200 ); 201 202 register_taxonomy( 'accp_client_page_categories', array( 'accp_client_pages'), $args );203 } 204 185 $args = array( 186 'labels' => $labels, 187 'public' => true, 188 'show_in_rest' => $show_in_rest, 189 'show_in_nav_menus' => false, 190 'show_ui' => true, 191 'show_tagcloud' => false, 192 'hierarchical' => true, 193 'rewrite' => false !== $rewrite_slug ? array( 'slug' => $rewrite_slug ) : false, 194 'query_var' => true, 195 'capabilities' => array( 196 'manage_terms' => 'manage_options', 197 'edit_terms' => 'manage_options', 198 'delete_terms' => 'manage_options', 199 'assign_terms' => 'manage_options', 200 ), 201 ); 202 203 register_taxonomy( 'accp_client_page_categories', array( 'accp_client_pages' ), $args ); 204 } 205 205 206 206 207 /** … … 211 212 public function accp_register_taxonomy_client_page_tags() { 212 213 213 $labels = array( 214 'name'=> _x( 'Client Page Tags', 'constellation-client-portal' ),215 'singular_name'=> _x( 'Client Page Tag', 'constellation-client-portal' ),216 'search_items'=> _x( 'Search Tags', 'constellation-client-portal' ),217 'popular_items'=> _x( 'Popular Tags', 'constellation-client-portal' ),218 'all_items'=> _x( 'All Tags', 'constellation-client-portal' ),219 'parent_item'=> _x( 'Parent Tag', 'constellation-client-portal' ),220 'parent_item_colon'=> _x( 'Parent Tag:', 'constellation-client-portal' ),221 'edit_item'=> _x( 'Edit Tag', 'constellation-client-portal' ),222 'update_item'=> _x( 'Update Tag', 'constellation-client-portal' ),223 'add_new_item'=> _x( 'Add New Tag', 'constellation-client-portal' ),224 'new_item_name'=> _x( 'New Tag', 'constellation-client-portal' ),225 'separate_items_with_commas' => _x( 'Separate tags with commas', 'constellation-client-portal' ),226 'add_or_remove_items'=> _x( 'Add or remove tags', 'constellation-client-portal' ),227 'choose_from_most_used'=> _x( 'Choose from the most used tags', 'constellation-client-portal' ),228 'menu_name'=> _x( 'Client Page Tags', 'constellation-client-portal' ),229 ); 230 231 /** 232 * Only show the post type in rest if the user has sufficient 214 $labels = array( 215 'name' => _x( 'Client Page Tags', 'constellation-client-portal' ), 216 'singular_name' => _x( 'Client Page Tag', 'constellation-client-portal' ), 217 'search_items' => _x( 'Search Tags', 'constellation-client-portal' ), 218 'popular_items' => _x( 'Popular Tags', 'constellation-client-portal' ), 219 'all_items' => _x( 'All Tags', 'constellation-client-portal' ), 220 'parent_item' => _x( 'Parent Tag', 'constellation-client-portal' ), 221 'parent_item_colon' => _x( 'Parent Tag:', 'constellation-client-portal' ), 222 'edit_item' => _x( 'Edit Tag', 'constellation-client-portal' ), 223 'update_item' => _x( 'Update Tag', 'constellation-client-portal' ), 224 'add_new_item' => _x( 'Add New Tag', 'constellation-client-portal' ), 225 'new_item_name' => _x( 'New Tag', 'constellation-client-portal' ), 226 'separate_items_with_commas' => _x( 'Separate tags with commas', 'constellation-client-portal' ), 227 'add_or_remove_items' => _x( 'Add or remove tags', 'constellation-client-portal' ), 228 'choose_from_most_used' => _x( 'Choose from the most used tags', 'constellation-client-portal' ), 229 'menu_name' => _x( 'Client Page Tags', 'constellation-client-portal' ), 230 ); 231 232 /** 233 * Only show the post type in rest if the user has sufficient 233 234 * capabilities. We want to enable show_in_rest to allow Gutenberg support, 234 235 * without allowing public access to the post type via the WP REST API. … … 239 240 * Allow custom rewrite slug. 240 241 */ 241 if ( true === $this->utilities->is_pro_plugin($this->plugin_name) ){242 if ( true === $this->utilities->is_pro_plugin( $this->plugin_name ) ) { 242 243 243 244 $rewrite_slug = $this->pro_admin->get_client_page_tags_rewrite_slug(); 244 245 245 } else{246 } else { 246 247 247 248 $rewrite_slug = false; … … 249 250 } 250 251 251 $args = array( 252 'labels' => $labels, 253 'public' => true, 254 'show_in_rest' => $show_in_rest, 255 'show_in_nav_menus' => false, 256 'show_ui' => true, 257 'show_tagcloud' => false, 258 'hierarchical' => false, 259 'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false, 260 'query_var' => true, 261 'capabilities' => array( 262 'manage_terms' => 'manage_options', 263 'edit_terms' => 'manage_options', 264 'delete_terms' => 'manage_options', 265 'assign_terms' => 'manage_options', 266 ), 267 ); 268 269 register_taxonomy( 'accp_client_page_tags', array('accp_client_pages'), $args ); 270 252 $args = array( 253 'labels' => $labels, 254 'public' => true, 255 'show_in_rest' => $show_in_rest, 256 'show_in_nav_menus' => false, 257 'show_ui' => true, 258 'show_tagcloud' => false, 259 'hierarchical' => false, 260 'rewrite' => false !== $rewrite_slug ? array( 'slug' => $rewrite_slug ) : false, 261 'query_var' => true, 262 'capabilities' => array( 263 'manage_terms' => 'manage_options', 264 'edit_terms' => 'manage_options', 265 'delete_terms' => 'manage_options', 266 'assign_terms' => 'manage_options', 267 ), 268 ); 269 270 register_taxonomy( 'accp_client_page_tags', array( 'accp_client_pages' ), $args ); 271 271 } 272 272 … … 274 274 /** 275 275 * Register the Client Page columns - Company. 276 */ 277 public function accp_client_pages_column_register( $columns ) { 276 * 277 * @param array $columns - The columns array. 278 */ 279 public function accp_client_pages_column_register( $columns ) { 278 280 279 281 $new_columns = array(); 280 282 281 foreach ( $columns as $column_name => $column_info ) {282 283 $new_columns[ $column_name ] = $column_info;284 283 foreach ( $columns as $column_name => $column_info ) { 284 285 $new_columns[ $column_name ] = $column_info; 286 285 287 if ( 'title' === $column_name ) { 286 $new_columns['company'] = __( 'Company', 'tcp' );288 $new_columns['company'] = __( 'Company', 'tcp' ); 287 289 } 288 290 } 289 291 290 return $new_columns; 292 return $new_columns; 291 293 } 292 294 … … 294 296 /** 295 297 * Display the Company column content in the Client Page WP List Table. 296 * 298 * 297 299 * @param string $column_name - The slug name of the column. 298 * @param int $post_id - The post ID of the Client Page.300 * @param int $post_id - The post ID of the Client Page. 299 301 */ 300 302 public function accp_client_pages_column_display_company_name( $column_name, $post_id ) { 301 302 if ( !is_admin() || !is_user_logged_in() || !current_user_can('manage_options') )303 304 if ( ! is_admin() || ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) { 303 305 return; 304 306 } 307 305 308 /** 306 309 * Client Company 307 310 */ 308 if ( 'company' != $column_name )311 if ( 'company' !== $column_name ) { 309 312 return; 310 311 $company_id = (int)get_post_meta($post_id, 'accp_user', true); 312 313 /** 314 * Check if this is a Client page set to global 315 * access before checking for a saved company. 316 * 317 * Only valid for Client Page post types, 318 * and not Client Files, Client Invoices, or 319 * direct file access. 320 */ 321 $core_authorization = new ARS_Constellation_Client_Portal_Core_Authorization( $this->plugin_name, $this->version ); 322 $is_global_page = $core_authorization->is_global_company_page($post_id); 323 324 /** 325 * Display the company name if one is assigned, 313 } 314 315 $company_id = (int) get_post_meta( $post_id, 'accp_user', true ); 316 317 /** 318 * Check if this is a Client page set to global 319 * access before checking for a saved company. 320 * 321 * Only valid for Client Page post types, 322 * and not Client Files, Client Invoices, or 323 * direct file access. 324 */ 325 $core_authorization = new ARS_Constellation_Client_Portal_Core_Authorization( $this->plugin_name, $this->version ); 326 $is_global_page = $core_authorization->is_global_company_page( $post_id ); 327 328 /** 329 * Display the company name if one is assigned, 326 330 * and this is not a global page. 327 331 */ 328 if( $company_id && $is_global_page != true ){ 329 330 $html = '<a href="' . esc_url(get_edit_post_link($company_id)) . '">' . esc_html(get_the_title($company_id)) . '</a>'; 331 332 echo wp_kses_post($html); 333 334 } 335 332 if ( $company_id && true !== $is_global_page ) { 333 334 $html = '<a href="' . esc_url( get_edit_post_link( $company_id ) ) . '">' . esc_html( get_the_title( $company_id ) ) . '</a>'; 335 336 echo wp_kses_post( $html ); 337 338 } 336 339 337 340 /** … … 339 342 * this is a global page. 340 343 */ 341 if ( true === $is_global_page ){344 if ( true === $is_global_page ) { 342 345 343 346 $hover_message = 'Global Pages are only suitable for companies comprised of users that are only assigned to one company, unless the page content is static.'; 344 347 345 $html = '<span class="accp-column-pointer-item" title="' . esc_attr($hover_message) . '" alt="' . esc_attr($hover_message) . '">Global Page</span>'; 346 347 echo wp_kses_post($html); 348 349 } 350 351 } 352 348 $html = '<span class="accp-column-pointer-item" title="' . esc_attr( $hover_message ) . '" alt="' . esc_attr( $hover_message ) . '">Global Page</span>'; 349 350 echo wp_kses_post( $html ); 351 352 } 353 } 353 354 } // END ARS_Constellation_Client_Portal_Client_Pages Class -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-company.php
r3062211 r3067786 227 227 ) 228 228 ); 229 229 230 230 $user_query = new WP_User_Query( $args ); 231 231 $users = (array) $user_query->results; 232 233 232 $user_name_list = array(); 234 233 … … 269 268 $view_page_link = get_the_permalink($accp_home_page); 270 269 271 echo '<span class="hov-nav-link">' . esc_url( $view_page_link) . '</span>';270 echo '<span class="hov-nav-link">' . esc_url( $view_page_link ) . '</span>'; 272 271 echo '<ul class="home-page-hov-nav row-actions"><li><a href="post.php?post=' . esc_attr($accp_home_page) . '&action=edit">Edit Page</a></li><li><a href="' . esc_url($view_page_link) . '" target="_blank">View Page</a></li></ul>'; 273 272 … … 298 297 foreach ($company_statuses as $field) { 299 298 300 if ($field['value'] == $saved_status){299 if ( $field['value'] == $saved_status ){ 301 300 302 301 echo esc_html($field['label']); -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-settings.php
r3062211 r3067786 292 292 293 293 } 294 295 294 296 295 … … 490 489 491 490 492 491 /** 492 * Get the email settings page content. 493 */ 493 494 function get_email_settings_page_content(){ 494 495 … … 521 522 522 523 524 /** 525 * Get the list/shortcode settings page content. 526 */ 523 527 function get_list_settings_page_content(){ 524 528 … … 548 552 549 553 554 /** 555 * Get the documentation settings page content. 556 */ 550 557 function get_documentation_settings_page_content(){ 551 558 … … 580 587 581 588 589 /** 590 * Get the site info settings page content. 591 */ 582 592 function get_site_info_settings_page_content(){ 583 593 … … 612 622 613 623 624 /** 625 * Get the license settings page content. 626 */ 614 627 function get_license_settings_page_content(){ 615 628 … … 639 652 640 653 654 /** 655 * Get the upgrade settings page content. 656 */ 641 657 function get_upgrade_settings_page_content(){ 642 658 … … 702 718 703 719 } 704 705 720 706 721 … … 1026 1041 $html .= '<h3>Allowed Upload File Types</h3>'; 1027 1042 1028 $html .= '<span>Select the upload file types that you would like to enable for client files and invoices. At least one file type must be enabled.</span>' ; 1029 1030 //settings_fields( 'ars-constellation-client-portal-settings-group' ); 1031 //do_settings_sections( 'ars-constellation-client-portal-settings-group' ); 1032 1033 // Generate nonce to delete mime type option data. 1043 $html .= '<span>Select the upload file types that you would like to enable for client files and invoices. At least one file type must be enabled.</span>'; 1044 1045 /** 1046 * Generate nonce to delete mime type option data. 1047 */ 1034 1048 $delete_mime_nonce = wp_create_nonce('delete_mime_nonce'); 1035 1049 1036 // Get list of available mime types. 1050 /** 1051 * Get list of available mime types. 1052 */ 1037 1053 $mime_checkboxes = $this->accp_admin->accp_defined_file_mime_types(); 1038 1054 -
constellation-client-portal/trunk/ars-constellation-client-portal.php
r3062211 r3067786 1 1 <?php 2 2 /** 3 * Constellation Client Portal WordPress plugin. 4 * 3 5 * @wordpress-plugin 4 6 * Plugin Name: Constellation Client Portal 5 7 * Plugin URI: https://adrianrodriguezstudios.com/constellation-client-portal/ 6 8 * 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.8. 19 * Version: 1.8.2 8 10 * Author: ARS 9 11 * Author URI: https://adrianrodriguezstudios.com 10 12 * License: GPL-3.0+ 11 13 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt 12 * Text Domain: ars-constellation-client-portal14 * Text Domain: constellation-client-portal 13 15 * Domain Path: /languages 14 * 16 * 15 17 * Copyright: (c) 2020-2023, Adrian Rodriguez Studios LLC ([email protected]) 16 18 * … … 19 21 * @link https://adrianrodriguezstudios.com 20 22 * @since 1.0.0 21 * @copyright Copyright (c) 2020-2023, Adrian Rodriguez Studios LLC 23 * @copyright Copyright (c) 2020-2023, Adrian Rodriguez Studios LLC 22 24 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 23 * 25 * 24 26 * This program is distributed in the hope that it will be useful, 25 27 * but WITHOUT ANY WARRANTY; without even the implied warranty of … … 43 45 * when attempting to activate this plugin. 44 46 */ 45 if( function_exists('activate_ars_constellation_client_portal') ){47 if ( function_exists( 'activate_ars_constellation_client_portal' ) ) { 46 48 47 49 $notice = '<p style="color: #3c434a; font-size: 13px; font-family: sans-serif; line-height: 1.5;"><strong>Duplicate Plugins:</strong> It looks like you already have another version of Constellation Client Portal active. Please deactivate that plugin before attempting to activate this one.</p>'; 48 50 49 exit( wp_kses_post( $notice) );51 exit( wp_kses_post( $notice ) ); 50 52 51 }else{53 } else { 52 54 53 55 /** … … 55 57 */ 56 58 define('ACCP_PLUGIN_NAME', 'ARS_CONSTELLATION_CLIENT_PORTAL'); 57 define('ACCP_PLUGIN_VERSION', '1.8. 1'); // Change the version in the header as well.59 define('ACCP_PLUGIN_VERSION', '1.8.2'); // Change the version in the header as well. 58 60 define( ACCP_PLUGIN_NAME, ACCP_PLUGIN_VERSION ); 59 define( 'ACCP_PLUGIN_FILE_NAME', __FILE__);60 define( 'ACCP_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) );61 define( 'ACCP_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) );61 define( 'ACCP_PLUGIN_FILE_NAME', __FILE__ ); 62 define( 'ACCP_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) ); 63 define( 'ACCP_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) ); 62 64 63 65 … … 68 70 */ 69 71 require_once plugin_dir_path( __FILE__ ) . 'includes/ars-constellation-client-portal-install-uninstall.php'; 70 71 } 72 } -
constellation-client-portal/trunk/public/index.php
r2663884 r3067786 1 <?php // Silence is golden 1 <?php // Silence is golden. -
constellation-client-portal/trunk/uninstall.php
r3062211 r3067786 1 1 <?php 2 3 2 /** 4 3 * Fired when the plugin is uninstalled.
Note: See TracChangeset
for help on using the changeset viewer.