Plugin Directory

Changeset 2946134


Ignore:
Timestamp:
08/01/2023 03:58:02 PM (3 years ago)
Author:
arstudios
Message:

Release 1.5.10.

Location:
constellation-client-portal
Files:
107 added
9 edited

Legend:

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

    r2933483 r2946134  
    55Requires at least: 5.0.0
    66Tested up to: 6.2
    7 Stable tag: 1.5.9
     7Stable tag: 1.5.10
    88Requires PHP: 7.4
    99License: GPLv3 or later
     
    206206== Changelog ==
    207207
     208= 1.5.10 (Pro) - 2023-8-1 =
     209* Improvement: Improved the company status settings new status row functionality.
     210* Update: Deprecated unused function in pro settings.
     211* Feature: Added new filter to allow users to change the default client file and invoice URL base name.
     212* Feature: Added new settings and functionality to allow users to change the default client file and invoice URL base name.
     213* Update: Fixed issue with the duplicate post type slug check for better accuracy.
     214
     215= 1.5.10 (Core) - 2023-8-1 =
     216* Update: Made updates to the install/uninstall file.
     217* Update: Made updates to the client invoice and client file post type args, and the client invoice category, client invoice tag, client file category, client file tag custom taxonomy args.
     218* Update: Minor css updates for the settings UI.
     219* Update: Made updates to the client page category and client page tag custom taxonomy args.
     220
    208221= 1.5.9 (Pro) - 2023-7-3 =
    209222* Fix: Updated the quick edit functionality related to the Reminder Email column in file and invoice WP list tables to prevent loss of the column after a quick edit (AJAX) update.
    210 * Feature: Added new filter to allow core users to change the default client page URL base name.
     223* Feature: Added new filter to allow users to change the default client page URL base name.
    211224* Feature: Added new settings and functionality to allows users to change the default client page URL base name.
    212225
     
    215228* Improvement: Created better method for displaying admin notices.
    216229* Update: Made minor updates to the file and invoice shortcodes.
    217 
    218230
    219231= 1.5.8 (Pro) - 2023-6-1 =
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-client-pages.php

    r2933483 r2946134  
    165165        $show_in_rest = current_user_can( 'manage_options' ) ? true : false;
    166166
     167        /**
     168         * Allow custom rewrite slug.
     169         */
     170        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     171
     172            $rewrite_slug = $this->pro_admin->get_client_page_categories_rewrite_slug();
     173
     174        }else{
     175
     176            $rewrite_slug = false;
     177
     178        }
     179
    167180        $args = array(
    168181            'labels' => $labels,
     
    173186            'show_tagcloud' => false,
    174187            'hierarchical' => true,
    175             'rewrite' => false,
     188            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,
    176189            'query_var' => true
    177190        );
     
    213226        $show_in_rest = current_user_can( 'manage_options' ) ? true : false;
    214227
     228        /**
     229         * Allow custom rewrite slug.
     230         */
     231        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     232
     233            $rewrite_slug = $this->pro_admin->get_client_page_tags_rewrite_slug();
     234
     235        }else{
     236
     237            $rewrite_slug = false;
     238
     239        }
     240
    215241        $args = array(
    216242            'labels' => $labels,
     
    221247            'show_tagcloud' => false,
    222248            'hierarchical' => false,
    223             'rewrite' => false,
     249            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,
    224250            'query_var' => true
    225251        );
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-file.php

    r2906601 r2946134  
    4545
    4646        $this->plugin_name = $plugin_name;
    47         $this->version = $version; 
     47        $this->version = $version;
     48        $this->utilities = new ACCP_Utility_Functions($this->plugin_name, $this->version);
     49
     50        if( class_exists('ARS_Constellation_Client_Portal_Pro_Admin') ){
     51
     52            $this->pro_admin = new ARS_Constellation_Client_Portal_Pro_Admin($this->plugin_name, $this->version);
     53
     54        }
    4855
    4956    }
     
    7178            'menu_name' => _x( 'Client Files', 'accp_clientfile' ),
    7279        );
     80
     81        /**
     82         * Allow custom rewrite slug.
     83         */
     84        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     85
     86            $rewrite_slug = $this->pro_admin->get_client_file_rewrite_slug();
     87
     88        }else{
     89
     90            $rewrite_slug = false;
     91
     92        }
    7393
    7494        $args = array(
     
    87107            'query_var' => true,
    88108            'can_export' => true,
    89             'rewrite' => false,
     109            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,
    90110            'capabilities' => array(
    91111                'edit_post' => 'update_core',
     
    129149        );
    130150
     151        /**
     152         * Allow custom rewrite slug.
     153         */
     154        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     155
     156            $rewrite_slug = $this->pro_admin->get_client_file_categories_rewrite_slug();
     157
     158        }else{
     159
     160            $rewrite_slug = false;
     161
     162        }
     163
    131164        $args = array(
    132165            'labels' => $labels,
     
    136169            'show_tagcloud' => false,
    137170            'hierarchical' => true,
    138             'rewrite' => false,
     171            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,
    139172            'query_var' => true
    140173        );
     
    169202        );
    170203
     204        /**
     205         * Allow custom rewrite slug.
     206         */
     207        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     208
     209            $rewrite_slug = $this->pro_admin->get_client_file_tags_rewrite_slug();
     210
     211        }else{
     212
     213            $rewrite_slug = false;
     214
     215        }
     216
    171217        $args = array(
    172218            'labels' => $labels,
     
    176222            'show_tagcloud' => false,
    177223            'hierarchical' => false,
    178             'rewrite' => false,
     224            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,
    179225            'query_var' => true
    180226        );
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-invoice.php

    r2920206 r2946134  
    4545
    4646        $this->plugin_name = $plugin_name;
    47         $this->version = $version; 
     47        $this->version = $version;
     48        $this->utilities = new ACCP_Utility_Functions($this->plugin_name, $this->version);
     49
     50        if( class_exists('ARS_Constellation_Client_Portal_Pro_Admin') ){
     51
     52            $this->pro_admin = new ARS_Constellation_Client_Portal_Pro_Admin($this->plugin_name, $this->version);
     53
     54        }
    4855
    4956    }
     
    7178            'menu_name' => _x( 'Client Invoices', 'clientinvoice' ),
    7279        );
     80
     81        /**
     82         * Allow custom rewrite slug.
     83         */
     84        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     85
     86            $rewrite_slug = $this->pro_admin->get_client_invoice_rewrite_slug();
     87
     88        }else{
     89
     90            $rewrite_slug = false;
     91
     92        }   
    7393
    7494        $args = array(
     
    87107            'query_var' => true,
    88108            'can_export' => true,
    89             'rewrite' => false,        
     109            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,     
    90110            'capabilities' => array(
    91111                'edit_post' => 'update_core',
     
    101121
    102122        register_post_type( 'accp_clientinvoice', $args );
     123
    103124    }
    104125   
     
    129150        );
    130151
     152        /**
     153         * Allow custom rewrite slug.
     154         */
     155        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     156
     157            $rewrite_slug = $this->pro_admin->get_client_invoice_categories_rewrite_slug();
     158
     159        }else{
     160
     161            $rewrite_slug = false;
     162
     163        }
     164
    131165        $args = array(
    132166            'labels' => $labels,
     
    136170            'show_tagcloud' => false,
    137171            'hierarchical' => true,
    138             'rewrite' => false,
     172            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,
    139173            'query_var' => true
    140174        );
    141175
    142176        register_taxonomy( 'accp_invoice_categories', array('accp_clientinvoice'), $args );
     177
    143178    }
    144179
     
    169204        );
    170205
     206        /**
     207         * Allow custom rewrite slug.
     208         */
     209        if( true === $this->utilities->is_pro_plugin($this->plugin_name) ){
     210
     211            $rewrite_slug = $this->pro_admin->get_client_invoice_tags_rewrite_slug();
     212
     213        }else{
     214
     215            $rewrite_slug = false;
     216
     217        }
     218
    171219        $args = array(
    172220            'labels' => $labels,
     
    176224            'show_tagcloud' => false,
    177225            'hierarchical' => false,
    178             'rewrite' => false,
     226            'rewrite' => $rewrite_slug !== false ? array('slug' => $rewrite_slug) : false,
    179227            'query_var' => true
    180228        );
    181229
    182230        register_taxonomy( 'accp_invoice_tags', array('accp_clientinvoice'), $args );
     231
    183232    }   
    184233
  • constellation-client-portal/trunk/admin/css/ars-constellation-client-portal-admin.css

    r2933483 r2946134  
    789789}
    790790
     791.accp-settings-section-inner {
     792    border-bottom: 1px solid #eee;
     793    padding-bottom: 15px;
     794    margin-bottom: 30px;
     795}
     796
    791797@media screen and (min-width: 980px) {
    792798
  • constellation-client-portal/trunk/ars-constellation-client-portal.php

    r2933483 r2946134  
    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.9
     7 * Version:           1.5.10
    88 * Author:            ARS
    99 * Author URI:        https://adrianrodriguezstudios.com
     
    5555     */
    5656    define('ACCP_PLUGIN_NAME', 'ARS_CONSTELLATION_CLIENT_PORTAL');
    57     define('ACCP_PLUGIN_VERSION', '1.5.9'); // Change the version in the header as well.
     57    define('ACCP_PLUGIN_VERSION', '1.5.10'); // Change the version in the header as well.
    5858    define( ACCP_PLUGIN_NAME, ACCP_PLUGIN_VERSION );
    5959    define('ACCP_PLUGIN_FILE_NAME', __FILE__);
  • constellation-client-portal/trunk/includes/ars-constellation-client-portal-install-uninstall.php

    r2893094 r2946134  
    7777     * check for the existence of each default value in the saved options.
    7878     */
    79     if( !empty($company_status_rows) && $company_status_rows != null ){
     79    if( is_array($company_status_rows) && !empty($company_status_rows) && $company_status_rows != null ){
    8080       
    81         $new = array();
     81        $new = array();     
    8282
    83         /**
    84          * Search multidimensional array.
    85          */
    86         function in_array_r($needle, $haystack, $strict = false) {
     83        foreach( $company_status_rows as $company_status_row ){
    8784
    88             foreach ($haystack as $item) {
     85            if( is_array($company_status_row) ){
    8986
    90                 if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) {
     87                /**
     88                 * Add the default 'active' status if not already present.
     89                 */
     90                if( !in_array('active', $company_status_row) ){
    9191
    92                     return true;
     92                    $new[] = array( 'label' => sanitize_text_field('Active'), 'value' => sanitize_text_field('active'), 'status_action' => sanitize_text_field('vis_no_action') );
     93
     94                }
     95
     96
     97                /**
     98                 * Add the default 'pending' status if not already present.
     99                 */
     100                if( !in_array('pending', $company_status_row) ){
     101
     102                    $new[] = array( 'label' => sanitize_text_field('Pending'), 'value' => 'pending', sanitize_text_field('status_action') => sanitize_text_field('vis_no_action') );
     103
     104                }
     105
     106
     107                /**
     108                 * Add the default 'inactive' status if not already present.
     109                 */
     110                if( !in_array('inactive', $company_status_row) ){
     111
     112                    $new[] = array( 'label' => sanitize_text_field('Inactive'), 'value' => sanitize_text_field('inactive'), 'status_action' => sanitize_text_field('vis_no_action') );
    93113
    94114                }
     
    96116            }
    97117
    98             return false;
    99118
    100         }
     119        }       
    101120       
    102         /**
    103          * Only add if the value is not already present.
    104          */
    105         if( !in_array_r('active', $company_status_rows)){
    106 
    107             $new[] = array( 'label' => sanitize_text_field('Active'), 'value' => sanitize_text_field('active'), 'status_action' => sanitize_text_field('vis_no_action') );
    108 
    109         }
    110 
    111         /**
    112          *  Only add if the value is not already present.
    113          */
    114         if( !in_array_r('pending', $company_status_rows)){
    115 
    116             $new[] = array( 'label' => sanitize_text_field('Pending'), 'value' => 'pending', sanitize_text_field('status_action') => sanitize_text_field('vis_no_action') );
    117 
    118         }
    119 
    120         /**
    121          * Only add if the value is not already present.
    122          */
    123         if( !in_array_r('inactive', $company_status_rows)){
    124 
    125             $new[] = array( 'label' => sanitize_text_field('Inactive'), 'value' => sanitize_text_field('inactive'), 'status_action' => sanitize_text_field('vis_no_action') );
    126 
    127         }
    128121
    129122        /**
  • constellation-client-portal/trunk/includes/class-ars-constellation-client-portal-utility-functions.php

    r2933483 r2946134  
    253253             * Check the post type slug if it exists.
    254254             */
    255             if( is_array($post_type->rewrite) ){
     255            if( is_array($post_type->rewrite) ){               
    256256   
    257                 $post_type_slug = array_key_exists('slug', $post_type->rewrite) ? 'slug: ' . $post_type->rewrite['slug'] : false;
    258 
     257                $post_type_slug = array_key_exists('slug', $post_type->rewrite) ? $post_type->rewrite['slug'] : false;
     258               
    259259                if( $post_type_slug && false !== $post_type_slug ){
    260260
     
    285285
    286286    /**
     287     * Check slug for uniqueness, and
     288     * verify that it is not already in use
     289     * by another taxonomy.
     290     *
     291     * @param string $slug - The slug to check.
     292     *
     293     * @return bool $is_unique - True if the slug is unique or false if not.
     294     */
     295    function check_if_taxonomy_slug_is_unique($slug){
     296
     297        $is_unique = true;
     298
     299        if(!$slug)
     300            return $is_unique;
     301
     302        /**
     303         * Get all post types.
     304         */
     305        $taxonomies = get_taxonomies( array(), 'objects');
     306
     307        foreach($taxonomies as $term){
     308           
     309            /**
     310             * Check the term name.
     311             */
     312            $name = $term->name;
     313
     314            /**
     315             * Return false if the term name
     316             * matches the slug being checked.
     317             */
     318            if( $name === $slug ){
     319
     320                $is_unique = false;
     321
     322                return $is_unique;
     323
     324            }
     325           
     326           
     327            /**
     328             * Check the term slug if it exists.
     329             */
     330            if( is_array($term->rewrite) ){
     331   
     332                $term_slug = array_key_exists('slug', $term->rewrite) ? $term->rewrite['slug'] : false;
     333
     334                if( $term_slug && false !== $term_slug ){
     335
     336                    $term_slug = str_replace('/', '', $term_slug);
     337
     338                    /**
     339                     * Return false if the term slug
     340                     * matches the slug being checked.
     341                     */
     342                    if( $term_slug === $slug ){
     343
     344                        $is_unique = false;
     345       
     346                        return $is_unique;
     347       
     348                    }
     349
     350                }
     351
     352            }
     353   
     354        }
     355
     356        return $is_unique;
     357
     358    }
     359
     360
     361    /**
    287362     * Check if this is the pro plugin.
    288363     *
Note: See TracChangeset for help on using the changeset viewer.