Plugin Directory

Changeset 3067786


Ignore:
Timestamp:
04/09/2024 04:01:49 PM (23 months ago)
Author:
arstudios
Message:

Release 1.8.2.

Location:
constellation-client-portal
Files:
131 added
1 deleted
8 edited

Legend:

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

    r3062211 r3067786  
    44Tags: client portal, private files, private pages, private posts, customer portal, business portal, invoicing, business managemenet, client management
    55Requires at least: 5.0.0
    6 Tested up to: 6.4
    7 Stable tag: 1.8.1
     6Tested up to: 6.5
     7Stable tag: 1.8.2
    88Requires PHP: 7.4
    99License: GPLv3 or later
     
    206206
    207207== 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
    208216= 1.8.1 (Pro) - 2024-4-1 =
    209217* Update: Made the bulk create and export sections responsive.
     
    246254* Improvement: Improved the client page, client invoice, and client file meta save functionality.
    247255* 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.
    249257* 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.
    250258* 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  
    1818}
    1919
     20/**
     21 * ARS_Constellation_Client_Portal_Admin Class.
     22 */
    2023class ARS_Constellation_Client_Portal_Admin {
    2124
     
    7578         */
    7679        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
    8184        /**
    8285         * Conditionally enqueue Font Awesome CSS.
    8386         */
    8487        if( !wp_style_is('font-awesome', 'registered') ){
    85            
     88
    8689            wp_enqueue_style( 'accp-font-awesome-css', dirname( plugin_dir_url( __FILE__ ) ) . '/assets/css/font-awesome/css/all.min.css', array(), $this->version, 'all' );
    8790
     
    196199     * Parse ACCP query_vars and
    197200     * handle actions.
     201     *
     202     * @param object $wp - The WP object.
    198203     */
    199204    function accp_parse_request( &$wp ){
     
    708713        $nonce = filter_var($_POST['bulk_delete_nonce'], FILTER_SANITIZE_STRING);
    709714
    710         if ( ! wp_verify_nonce( $nonce, 'clientfile_admin_nonce' ) )
    711             die ();
     715        if ( ! wp_verify_nonce( $nonce, 'clientfile_admin_nonce' ) )
     716            die();
    712717       
    713718        $file_ids = json_decode( stripslashes($_POST['del_file_post_id_json']) ); // Sanitize in loop.
     
    19661971    function accp_save_post($post_id, $post = null){
    19671972
    1968         if( !is_user_logged_in() || !is_admin() )           
     1973        if( !is_user_logged_in() )         
    19691974            return wp_die('Invalid command.');
    19701975       
     
    20932098                     * Save uploaded file info to post meta.
    20942099                     */
    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);
    21042101
    21052102                    /**
     
    21092106                     * if the file has changed (i.e. new file upload or updated file upload).
    21102107                     */
    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);
    21122117
    21132118
     
    21162121                     * client portal uploads dir if needed.
    21172122                     */
    2118                     $this->copy_index_file_to_uploads_dir($post_id);
     2123                    $this->copy_index_file_to_uploads_dir($post_id);                   
    21192124
    21202125                }
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-client-pages.php

    r3062211 r3067786  
    77 * @author     Adrian Rodriguez
    88 * @since      1.0.0
    9  * 
     9 *
    1010 * Client Pages (accp_client_pages) post type admin specific functionality.
    1111 */
     
    1818}
    1919
     20
     21/**
     22 * ARS_Constellation_Client_Portal_Client_Pages Class.
     23 */
    2024class ARS_Constellation_Client_Portal_Client_Pages {
    2125
     
    4246     *
    4347     * @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.
    4650     */
    4751    public function __construct( $plugin_name, $version ) {
    4852
    4953        $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        }
    6063    }
    6164
     
    6568     *
    6669     * @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
    8790         * capabilities.  We want to enable show_in_rest to allow Gutenberg support,
    8891         * without allowing public access to the post type via the WP REST API.
    8992         */
    9093        $show_in_rest = current_user_can( 'manage_options' ) ? true : false;
    91        
    9294
    9395        /**
    9496         * Allow custom rewrite slug.
    9597         */
    96         if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     98        if ( true === $this->utilities->is_pro_plugin( $this->plugin_name ) ) {
    9799
    98100            $rewrite_slug = $this->pro_admin->get_client_page_rewrite_slug();
    99101
    100         }else{
     102        } else {
    101103
    102104            $rewrite_slug = 'accp-client-page';
    103105
    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            ),
    132134        );
    133135
    134136        register_post_type( 'accp_client_pages', $args );
    135        
    136     }
    137    
     137    }
     138
    138139
    139140    /**
     
    144145    public function accp_register_taxonomy_client_page_categories() {
    145146
    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
    166167         * capabilities.  We want to enable show_in_rest to allow Gutenberg support,
    167168         * without allowing public access to the post type via the WP REST API.
     
    172173         * Allow custom rewrite slug.
    173174         */
    174         if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     175        if ( true === $this->utilities->is_pro_plugin( $this->plugin_name ) ) {
    175176
    176177            $rewrite_slug = $this->pro_admin->get_client_page_categories_rewrite_slug();
    177178
    178         }else{
     179        } else {
    179180
    180181            $rewrite_slug = false;
     
    182183        }
    183184
    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
    205206
    206207    /**
     
    211212    public function accp_register_taxonomy_client_page_tags() {
    212213
    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
    233234         * capabilities.  We want to enable show_in_rest to allow Gutenberg support,
    234235         * without allowing public access to the post type via the WP REST API.
     
    239240         * Allow custom rewrite slug.
    240241         */
    241         if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     242        if ( true === $this->utilities->is_pro_plugin( $this->plugin_name ) ) {
    242243
    243244            $rewrite_slug = $this->pro_admin->get_client_page_tags_rewrite_slug();
    244245
    245         }else{
     246        } else {
    246247
    247248            $rewrite_slug = false;
     
    249250        }
    250251
    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 );
    271271    }
    272272
     
    274274    /**
    275275     * 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 ) {
    278280
    279281        $new_columns = array();
    280282
    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
    285287            if ( 'title' === $column_name ) {
    286               $new_columns['company'] = __( 'Company', 'tcp' );           
     288                $new_columns['company'] = __( 'Company', 'tcp' );
    287289            }
    288290        }
    289291
    290         return $new_columns; 
     292        return $new_columns;
    291293    }
    292294
     
    294296    /**
    295297     * Display the Company column content in the Client Page WP List Table.
    296      * 
     298     *
    297299     * @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.
    299301     */
    300302    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' ) ) {
    303305            return;
    304        
     306        }
     307
    305308        /**
    306309         * Client Company
    307310         */
    308         if ( 'company' != $column_name )
     311        if ( 'company' !== $column_name ) {
    309312            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,
    326330         * and this is not a global page.
    327331         */
    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        }
    336339
    337340        /**
     
    339342         * this is a global page.
    340343         */
    341         if( true === $is_global_page ){
     344        if ( true === $is_global_page ) {
    342345
    343346            $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.';
    344347
    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    }
    353354} // END ARS_Constellation_Client_Portal_Client_Pages Class
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-company.php

    r3062211 r3067786  
    227227            )
    228228        );
    229        
     229
    230230        $user_query = new WP_User_Query( $args );
    231231        $users = (array) $user_query->results;
    232        
    233232        $user_name_list = array();
    234233
     
    269268            $view_page_link = get_the_permalink($accp_home_page);
    270269
    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>';   
    272271            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>';
    273272
     
    298297            foreach ($company_statuses as $field) {
    299298
    300                 if($field['value'] == $saved_status){
     299                if ( $field['value'] == $saved_status ){
    301300
    302301                    echo esc_html($field['label']);             
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-settings.php

    r3062211 r3067786  
    292292
    293293    }
    294 
    295294       
    296295   
     
    490489
    491490
    492 
     491    /**
     492     * Get the email settings page content.
     493     */
    493494    function get_email_settings_page_content(){
    494495
     
    521522
    522523
     524    /**
     525     * Get the list/shortcode settings page content.
     526     */
    523527    function get_list_settings_page_content(){
    524528
     
    548552
    549553
     554    /**
     555     * Get the documentation settings page content.
     556     */
    550557    function get_documentation_settings_page_content(){
    551558
     
    580587
    581588
     589    /**
     590     * Get the site info settings page content.
     591     */
    582592    function get_site_info_settings_page_content(){
    583593
     
    612622
    613623
     624    /**
     625     * Get the license settings page content.
     626     */
    614627    function get_license_settings_page_content(){
    615628
     
    639652
    640653
     654    /**
     655     * Get the upgrade settings page content.
     656     */
    641657    function get_upgrade_settings_page_content(){
    642658
     
    702718
    703719    }
    704 
    705720
    706721
     
    10261041        $html .=        '<h3>Allowed Upload File Types</h3>';
    10271042
    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         */
    10341048        $delete_mime_nonce = wp_create_nonce('delete_mime_nonce');
    10351049
    1036         // Get list of available mime types.
     1050        /**
     1051         * Get list of available mime types.
     1052         */
    10371053        $mime_checkboxes = $this->accp_admin->accp_defined_file_mime_types();
    10381054
  • constellation-client-portal/trunk/ars-constellation-client-portal.php

    r3062211 r3067786  
    11<?php
    22/**
     3 * Constellation Client Portal WordPress plugin.
     4 *
    35 * @wordpress-plugin
    46 * Plugin Name:       Constellation Client Portal
    57 * Plugin URI:        https://adrianrodriguezstudios.com/constellation-client-portal/
    68 * 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.1
     9 * Version:           1.8.2
    810 * Author:            ARS
    911 * Author URI:        https://adrianrodriguezstudios.com
    1012 * License:           GPL-3.0+
    1113 * License URI:       http://www.gnu.org/licenses/gpl-3.0.txt
    12  * Text Domain:       ars-constellation-client-portal
     14 * Text Domain:       constellation-client-portal
    1315 * Domain Path:       /languages
    14  * 
     16 *
    1517 * Copyright: (c) 2020-2023, Adrian Rodriguez Studios LLC ([email protected])
    1618 *
     
    1921 * @link       https://adrianrodriguezstudios.com
    2022 * @since      1.0.0
    21  * @copyright  Copyright (c) 2020-2023, Adrian Rodriguez Studios LLC 
     23 * @copyright  Copyright (c) 2020-2023, Adrian Rodriguez Studios LLC
    2224 * @license    http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
    23  * 
     25 *
    2426 * This program is distributed in the hope that it will be useful,
    2527 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     
    4345 * when attempting to activate this plugin.
    4446 */
    45  if( function_exists('activate_ars_constellation_client_portal') ){
     47if ( function_exists( 'activate_ars_constellation_client_portal' ) ) {
    4648
    4749    $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>';
    4850
    49     exit( wp_kses_post($notice) ); 
     51    exit( wp_kses_post( $notice ) );
    5052
    51  }else{
     53} else {
    5254
    5355    /**
     
    5557     */
    5658    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.
    5860    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__ ) );
    6264
    6365
     
    6870     */
    6971    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  
    11<?php
    2 
    32/**
    43 * Fired when the plugin is uninstalled.
Note: See TracChangeset for help on using the changeset viewer.