Plugin Directory

Changeset 2987566


Ignore:
Timestamp:
11/01/2023 05:45:42 PM (2 years ago)
Author:
arstudios
Message:

Release 1.7.1.

Location:
constellation-client-portal
Files:
133 added
4 deleted
10 edited

Legend:

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

    r2973972 r2987566  
    22Author: ARS
    33Contributors: arstudios
    4 Tags: client portal, customer portal, business portal, client management, private files, private pages, invoice clients, invoicing, business managemenet
     4Tags: client portal, customer portal, business portal, client management, private files, private pages, private posts, invoice clients, invoicing, business managemenet
    55Requires at least: 5.0.0
    66Tested up to: 6.3
    7 Stable tag: 1.7.0
     7Stable tag: 1.7.1
    88Requires PHP: 7.4
    99License: GPLv3 or later
     
    1212== Description ==
    1313
    14 Turn your WordPress site into a professional client portal and streamline your operation.  Create private pages for your clients, customers, and team members.  Grant them access to private documents, files, and invoices in one, central location.
     14Turn your WordPress site into a professional client portal and streamline your operation.  Create private pages for your clients, customers, and team members.  Create private posts and attach private files (example: pdf, jpg, docx, xlsx, etc).
    1515
    1616Upgrade to the [Pro version](https://adrianrodriguezstudios.com/constellation-client-portal/?utm_source=wporg "Get Constellation Client Portal Pro") and integrate with WooCommerce to accept payments for invoices and services.
     
    1919
    2020* Create private pages for your clients, customers, and team members.
    21 * Create private invoices and files for your clients and display them on private client pages, with simple to use shortcodes.
     21* Create private invoice and file posts for your clients and display them on private client pages, with simple to use shortcodes.
     22* Attach private files (example: pdf, jpg, docx, xlsx, etc) to invoice and file posts.
    2223* Prevent direct access to client files by users, search engines, and bots.
    2324* Assign WordPress users to Companies.
     
    3233* Automatically send email notifications to clients when a new File or Invoice post is created.
    3334* Automatically send reminder email notifications on a schedule.
     35* Easily customize the look of client-facing lists.
     36* Display client-facing lists in list or grid layout.
    3437* Easily generate, save, and edit file and invoice shortcodes within the plugin settings.
    3538* Add due dates and past due notices to invoices and files.
     
    57601. Client-Facing - Current Invoice List
    58612. Client-Facing - Paid Invoice List
    59 3. Client-Facing - Document/File List
     623. Client-Facing - Grid Style Document/File List
    60634. Admin Settings - Pro General Settings
    61645. Admin Settings - Pro Invoice Settings
     
    717415. Admin Settings - Pro List/Shortcode Settings
    727516. Admin Settings - Pro List/Shortcode Edit Settings
     7617. Admin Settings - Pro List/Shortcode Theme Settings
    7377
    7478== Shortcodes (Core) ==
     
    128132
    129133* **excluded_page_ids** - this allows for pages that are assigned to a given company to be excluded from the company menu.  Accepts a comma separated list of Client Page ID's. Default = null.
    130 * **list_style** - this allows the UL orientation to be change.  Accepts 'vertical' or 'horizontal.' Default = horizontal.
     134* **list_style** - this allows the UL orientation to be changed.  Accepts 'vertical' or 'horizontal.' Default = horizontal.
    131135* **align** - this allows for the menu alignment to be set.  Accepts 'left,' 'right,' or 'center.' Default = left.
    132136
     
    149153
    150154= Can I provide private files and documents for my clients to access and download? =
    151 Yes.  Constellation Client Portal is designed to allow you to post files and documents for your clients that only a specific client has access to.  Anyone who has not been granted access to a specific client page or file will not be able to view that asset.
     155Yes.  Constellation Client Portal is designed to allow you to attach files to private posts.  This allows you to present private  private files and/or private posts to clients.
    152156
    153157= Can I provide private posts and information to my clients? =
     
    164168
    165169= Can I restrict access to specific documents and pages for specific users or roles? =
    166 Yes.  The Pro version allows for more granular access restriction by specific user or role.
     170Yes.  The Pro version allows for more granular access restriction by specific user or role, as well as by category.
    167171
    168172= Can I add file and invoice shortcodes to any WordPress page or post? =
     
    174178= Will my theme's page builder work with client pages? =
    175179This is dependent on the theme, and Constellation Client Portal has no control over this functionality.  However, some themes may work out of the box with client pages.  If your theme's page builder does not work with client pages, check with the theme developer to see if they have a method for extending the page builder to custom post types (the client page post type is "accp_client_pages").
     180
     181= Can I customize the look of post lists displayed on the front-end? =
     182Yes.  The Pro version allows you to customize the look of each list independently.  The pro version also allows you to display post lists in list or grid layouts.
    176183
    177184== Installation ==
     
    193200
    194201== Changelog ==
     202
     203= 1.7.1 (Pro) - 2023-11-1 =
     204* Update: Updated the documentation page content within settings.
     205* Fix: Updated the font-awesome fa-close to fa-times to fix missing close icons.
     206* Update: Added a header with instructions to the shortcode list settings page.
     207* Update: Updated plugin update PHP notice functionality.
     208* Fix: Updated the new post email notification function to fix undefined vars.
     209* Update: Updated the past due notice styling to fix inconsistent vertical alignment of the text.
     210* Fix: Fixed issue in which the thumbnail alignment class was not properly composed from the pro shortcode settings value.
     211* Update: Moved list shortcode specific CSS from the default pro public CSS file to a new dedicated pro list shortcode CSS file.
     212* Feature: Created functionality that allows front-end lists to be displayed in a grid layout.
     213* Feature: Created functionality that allows for styling of front-end file and invoice lists.
     214* Update: Create new theme settings page that allows for list shortcode theme settings to be saved and retrieved.
     215* Update: Added functionality to dynamically add the pro list shortcode CSS to the page to allow for list UI styles to be updated in the shortcode settings.
     216
     217= 1.7.1 (Core) - 2023-11-1 =
     218* Update: Updated the add default company statuses on activation functionality to clear duplicate status message on plugin activation.
     219* Update: Updated the list shortcode thumbnail float-left styling.
     220* Fix: Fixed typo in file center thumb alignment CSS rule name.
     221* Update: Moved list shortcode specific CSS from the default public CSS file to a new dedicated list shortcode CSS file.
     222* Update: Added functionality to dynamically add the default list shortcode CSS to the page.
    195223
    196224= 1.7.0 (Pro) - 2023-10-2 =
     
    209237* Update: Deprecated the accp-invoice-list-shortcode-includes dir.
    210238* Update: Deprecated the accp-file-list-shortcode-includes dir.
    211 * Update: Deprecated the premium admin dir is this will not be used.
     239* Update: Deprecated the premium admin dir as this will not be used going forward.
    212240* Feature: Added functionality to allow shortcodes to be genarated and saved as settings for easier implementation and editing.
    213241* Update: Overhauled the pro file and invoice list shortcode framework for better maintainability and scalability, and for forthcoming features.
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-file.php

    r2946134 r2987566  
    744744        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
    745745            return $post_id;
     746
     747        if( !function_exists('get_current_screen') )
     748            return $post_id;
    746749       
    747750        $current_screen = get_current_screen();     
  • constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-settings.php

    r2973972 r2987566  
    666666    function get_core_conent_for_documentation_settings_page(){
    667667
     668        $is_pro = $this->utilities->is_pro_plugin($this->plugin_name);
     669        $list_settings_url = get_admin_url() . 'admin.php?page=accp-list-settings&title=Lists';
     670
    668671        $html = '';
    669672
     
    684687        $html .= '</div>';
    685688       
    686         $html .= '<div class="accp-settings-section">';
     689        $html .= '<div class="accp-settings-section">';       
    687690
    688691        $html .=    '<h2>Shortcodes</h2>';
    689692
    690         $html .=    '<p>View the <a href="https://adrianrodriguezstudios.com/documentation-constellation-client-portal/#shortcodes" target="_blank">Shortcode Documentation</a> for detailed information about all available shortcode parameters.</p>';
    691 
    692         $html .=    '<div class="accp-shortcode-container">';
    693 
    694         $html .=        '<h3>File List Shortcodes</h3>';
    695 
    696         $html .=        '<div class="shortcode-markup">';
    697 
    698         $html .=            '<p>[accp_clientfiles categories="category1-slug, category2-slug" display_number="20" order_by="title" order="ASC" show_excerpt="true" excerpt_length="50" show_thumbnail="true" thumbnail_size="portfolio" align_thumbnail="center" show_post_date="true" due_date="true" past_due_notice="true"]</p>';
    699 
    700         $html .=        '</div>';
    701 
    702         $html .=        '<div class="shortcode-description">';
    703 
    704         $html .=            '<p>The accp_clientfiles shortcode displays a list of files that are assigned to the respective company (of the logged in user).  The list can be filtered by category, as well as other filtering options, and multiple lists can be placed on the same page.</p>';
    705 
    706         $html .=        '</div>';
    707 
    708         $html .=    '</div>';
    709 
    710         $html .=    '<div class="accp-shortcode-container">';
    711 
    712         $html .=        '<h3>Invoice List Shortcodes</h3>';
    713 
    714         $html .=        '<div class="shortcode-markup">';
    715 
    716         $html .=            '<p>[accp_clientinvoices invoice_status="unpaid" display_number="20" order_by="title" order="ASC" show_excerpt="true" excerpt_length="50" show_thumbnail="true" thumbnail_size="portfolio" align_thumbnail="center" show_post_date="true" due_date="true" past_due_notice="true" display_pay_btn="true"]</p>';
    717 
    718         $html .=        '</div>';
    719 
    720         $html .=        '<div class="shortcode-markup">';
    721 
    722         $html .=            '<p>[accp_clientinvoices invoice_status="paid" display_number="20" order_by="title" order="ASC" show_excerpt="true" excerpt_length="50" show_thumbnail="true" thumbnail_size="portfolio" align_thumbnail="center" show_post_date="true"]</p>';
    723 
    724         $html .=        '</div>';
    725 
    726         $html .=        '<div class="shortcode-description">';
    727 
    728         $html .=            '<p>The accp_clientinvoices shortcode displays a list of invoices that are assigned to the respective company (of the logged in user).  Separate lists can be created for paid and unpaid invoices, and each list can be further filtered by category (as well as by other filtering options).  Multiple lists can also be placed on the same page (example: an "unpaid" invoice shortcode can be placed at the top of a page to display the current invoice, and a "paid" invoice shortcode can be placed below that to display a list of past/paid invoices).</p>';
    729 
    730         $html .=        '</div>';
     693        if( !$is_pro ):
     694
     695            $html .=    '<p>View the <a href="https://adrianrodriguezstudios.com/documentation-constellation-client-portal/#shortcodes" target="_blank">Shortcode Documentation</a> for detailed information about all available shortcode parameters, or upgrade to the <a href="https://adrianrodriguezstudios.com/constellation-client-portal/?utm_source=plugin_documentation_upgrade" target="_blank">Pro version</a> for easier list generation and implementation.</p>';
     696
     697            $html .=    '<div class="accp-shortcode-container">';
     698
     699            $html .=        '<h3>File List Shortcodes</h3>';
     700
     701            $html .=        '<div class="shortcode-markup">';
     702
     703            $html .=            '<p>[accp_clientfiles categories="category1-slug, category2-slug" display_number="20" order_by="title" order="ASC" show_excerpt="true" excerpt_length="50" show_thumbnail="true" thumbnail_size="portfolio" align_thumbnail="center" show_post_date="true" due_date="true" past_due_notice="true"]</p>';
     704
     705            $html .=        '</div>';
     706
     707            $html .=        '<div class="shortcode-description">';
     708
     709            $html .=            '<p>The accp_clientfiles shortcode displays a list of files that are assigned to the respective company (of the logged in user).  The list can be filtered by category, as well as other filtering options, and multiple lists can be placed on the same page.</p>';
     710
     711            $html .=        '</div>';
     712
     713            $html .=    '</div>';
     714
     715            $html .=    '<div class="accp-shortcode-container">';
     716
     717            $html .=        '<h3>Invoice List Shortcodes</h3>';
     718
     719            $html .=        '<div class="shortcode-markup">';
     720
     721            $html .=            '<p>[accp_clientinvoices invoice_status="unpaid" display_number="20" order_by="title" order="ASC" show_excerpt="true" excerpt_length="50" show_thumbnail="true" thumbnail_size="portfolio" align_thumbnail="center" show_post_date="true" due_date="true" past_due_notice="true" display_pay_btn="true"]</p>';
     722
     723            $html .=        '</div>';
     724
     725            $html .=        '<div class="shortcode-markup">';
     726
     727            $html .=            '<p>[accp_clientinvoices invoice_status="paid" display_number="20" order_by="title" order="ASC" show_excerpt="true" excerpt_length="50" show_thumbnail="true" thumbnail_size="portfolio" align_thumbnail="center" show_post_date="true"]</p>';
     728
     729            $html .=        '</div>';
     730
     731            $html .=        '<div class="shortcode-description">';
     732
     733            $html .=            '<p>The accp_clientinvoices shortcode displays a list of invoices that are assigned to the respective company (of the logged in user).  Separate lists can be created for paid and unpaid invoices, and each list can be further filtered by category (as well as by other filtering options).  Multiple lists can also be placed on the same page (example: an "unpaid" invoice shortcode can be placed at the top of a page to display the current invoice, and a "paid" invoice shortcode can be placed below that to display a list of past/paid invoices).</p>';
     734
     735            $html .=        '</div>';
     736
     737        else:
     738
     739            $html .=        '<div class="shortcode-description">';
     740
     741            $html .=            '<p>File and invoice shortcodes can be created in the <a href="'.esc_url($list_settings_url).'">List Settings</a>.  The shortcodes can then be pasted into client pages to display file and invoice lists on the front-end.</p>';
     742
     743            $html .=        '</div>';
     744
     745        endif;
    731746
    732747        $html .=    '</div>';
     
    11321147            'disabled'    => array(),
    11331148            'size'        => array(),
    1134             'data-term-slug' => array(),           
     1149            'min'         => array(),
     1150            'max'         => array(),
     1151            'data-term-slug' => array(),
     1152            'step'        => array(),
     1153            'maxlength'   => array(),           
    11351154        );
    11361155
  • constellation-client-portal/trunk/ars-constellation-client-portal.php

    r2973972 r2987566  
    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.7.0
     7 * Version:           1.7.1
    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.7.0'); // Change the version in the header as well.
     57    define('ACCP_PLUGIN_VERSION', '1.7.1'); // 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

    r2946134 r2987566  
    7171        update_option('accp_company_status_repeater', $new);
    7272
     73        return;
     74
    7375    }
    7476
     
    7981    if( is_array($company_status_rows) && !empty($company_status_rows) && $company_status_rows != null ){
    8082       
    81         $new = array();     
     83        $new = array();
     84        $missing_statuses = array();
    8285
    8386        foreach( $company_status_rows as $company_status_row ){
    8487
    85             if( is_array($company_status_row) ){
     88            if( 'active' === $company_status_row['value'] ){
    8689
    87                 /**
    88                  * Add the default 'active' status if not already present.
    89                  */
    90                 if( !in_array('active', $company_status_row) ){
    91 
    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') );
    113 
    114                 }
     90                $missing_statuses[] = 'active';
    11591
    11692            }
    11793
     94            if( 'inactive' === $company_status_row['value'] ){
     95
     96                $missing_statuses[] = 'inactive';
     97
     98            }
     99
     100            if( 'pending' === $company_status_row['value'] ){
     101
     102                $missing_statuses[] = 'pending';
     103
     104            }   
     105
     106
     107        }
     108
     109        if( !in_array('active', $missing_statuses) ){
     110
     111            $new[] = array( 'label' => sanitize_text_field('Active'), 'value' => sanitize_text_field('active'), 'status_action' => sanitize_text_field('vis_no_action') );
     112
     113        }
     114
     115        /**
     116         * Add the default 'pending' status if not already present.
     117         */
     118        if( !in_array('pending', $missing_statuses) ){
     119
     120            $new[] = array( 'label' => sanitize_text_field('Pending'), 'value' => 'pending', sanitize_text_field('status_action') => sanitize_text_field('vis_no_action') );
     121
     122        }
     123
     124
     125        /**
     126         * Add the default 'inactive' status if not already present.
     127         */
     128        if( !in_array('inactive', $missing_statuses) ){
     129
     130            $new[] = array( 'label' => sanitize_text_field('Inactive'), 'value' => sanitize_text_field('inactive'), 'status_action' => sanitize_text_field('vis_no_action') );
    118131
    119132        }       
     
    123136         *  Combine the existing array values with the default array values.
    124137         */
    125         $combined_array = array_merge($new, $company_status_rows);
     138        if( !empty($new) ){
     139
     140            $combined_array = array_merge($new, $company_status_rows);
     141
     142        }else{
     143
     144            $combined_array = $company_status_rows;
     145
     146        }
    126147
    127148        /**
  • constellation-client-portal/trunk/public/css/ars-constellation-client-portal-public.css

    r2663884 r2987566  
    11/**
    2  * CSS for your public-facing functionality
    3  */
    4  
    5 .file-thumb-align-float-left{
    6     float: left;   
    7 }
    8 
    9 .file-thumb-align-float-right{
    10     float: right;   
    11 }
    12 
    13 .file-thumb-align-left{
    14     text-align: left;
    15     width: 100%;
    16 }
    17 
    18 .file-thumb-align-right{
    19     text-align: right;
    20     width: 100%;
    21 }
    22 
    23 .file-thumb-align-cetner{
    24     text-align: center;
    25     width: 100%;
    26 }
    27 
    28 .accp-past-due-notice{
    29     font-weight:bold;
    30     text-transform:uppercase;
    31     font-size:11px;
    32     color:#fff;
    33     background-color:darkorange;
    34     padding:1px 5px 1px 5px;
    35     margin-left: 5px;
    36 }
    37 
    38 .accp-due-date{
    39     font-size: 12px;   
    40 }
    41 
    42 .accp_documents_filelist .accp-file-list-item-title a{
    43     text-decoration-color: none;
    44 }
    45 
    46 .accp-file-list-item-title {
    47     margin-top: 12px;
    48     display: block;
    49 }
    50 
    51 .accp-file-post-date {
    52     margin-top: 3px;
    53     font-size: 14px;
    54 }
    55 
    56 .accp-item-container {
    57     background: #f9f9f9 none repeat scroll 0 0;
    58     border-bottom: 1px solid #efefef;
    59     border-top: 1px solid #efefef;
    60     margin-bottom: 15px;
    61     padding-bottom: 15px;
    62     padding-left: 25px;
    63     padding-right: 25px;
    64     padding-top: 15px;
    65 }
    66 
    67 .accp_documents_filelist .accp-list-item-meta {
    68     margin-bottom: 10px;
    69 }
    70 
    71 .accp-page-nav-container {
    72     border: 1px solid #f9f9f9;     
    73     padding: 10px;
    74 }
    75 
    76 .accp-pay-btn {
    77     -moz-user-select: none;
    78     background-attachment: scroll;
    79     background-clip: border-box;
    80     background-color: #0070ba;
    81     border-radius: 3px;
    82     color: #fff;
    83     cursor: pointer;
    84     display: inline-block;
    85     font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;         
    86     letter-spacing: normal;
    87     line-height: 14.9654px;
    88     margin: 20px 0 5px 0;   
    89     text-align: center;
    90     text-indent: 0;   
    91     transition: all 0.2s ease-out 0s;
    92 }
    93 
    94 .accp-pay-btn a {
    95     color: #fff;
    96     font-size: 16px;
    97     text-decoration: none;
    98     min-width: 66px;   
    99     padding: 14px 16px;
    100     display: block;
    101 }
    102 
    103 a.accp-pay-link{
    104     color: #fff;
    105 }
    106 
    107 .accp-view-dl-link-container a {
    108     font-size: 11px;
    109     text-decoration: none;
    110 }
    111 
    112 .accp-pay-btn:hover {
    113     background-color: #3cacf6;
    114 }
     2 * Public-facing CSS.
     3 */
  • constellation-client-portal/trunk/public/shortcodes/class-ars-constellation-client-portal-list-shortcodes.php

    r2973972 r2987566  
    2929        $this->accp_admin = new ARS_Constellation_Client_Portal_Admin(ACCP_PLUGIN_NAME, ACCP_PLUGIN_VERSION);
    3030        $this->is_pro = $this->utilities->is_pro_plugin($this->plugin_name);
     31        $this->new_line = "\n";
     32
     33        /**
     34         * Enqueue the list shortcode default CSS.
     35         */
     36        add_action( 'wp_enqueue_scripts', array($this, 'enqueue_shortcode_style') );       
    3137
    3238    }
     
    5359        if ( !is_user_logged_in() || is_admin() )
    5460            return;
     61       
    5562       
    5663        /**
     
    192199         * Get the file status var.
    193200         */
    194         $file_status = $this->get_file_or_invoice_status_var($atts);       
     201        $file_status = $this->get_file_or_invoice_status_var($atts);             
    195202
    196203        /**
     
    248255         */
    249256        $align_thumbnail = $this->get_align_thumbnail_var($atts);
    250 
     257       
    251258        /**
    252259         * Get the link title var.
     
    964971     * @return string|false $align_thumbnail - the thumbnail CSS class suffix.
    965972     */
    966     function get_align_thumbnail_var($atts){
    967 
    968         if( !array_key_exists('align_thumbnail', $atts) )
    969             return '';
    970 
    971         if( empty($atts['align_thumbnail']) )
    972             return '';
    973 
    974         $att_input = trim( strtolower($atts['align_thumbnail']) );     
     973    function get_align_thumbnail_var($atts){   
     974
     975        if( array_key_exists('align_thumbnail', $atts) && !empty($atts['align_thumbnail']) ){
     976
     977            $att_input = trim( strtolower($atts['align_thumbnail']) );     
     978
     979        }else{
     980
     981            $att_input = '';
     982
     983        }
    975984
    976985        switch($att_input){
     
    9991008                $align_thumbnail = '';
    10001009
    1001         }     
     1010        }
    10021011
    10031012        return apply_filters('accp_update_align_thumbnail_shortcode_var', $align_thumbnail, $atts);
     
    10711080        }
    10721081
    1073         return apply_filters('accp_update_container_id_shortcode_var', $container_id, $atts);
     1082        return sanitize_text_field( apply_filters('accp_update_container_id_shortcode_var', $container_id, $atts) );
    10741083
    10751084    }
     
    10941103        }
    10951104
    1096         return apply_filters('accp_update_container_classes_shortcode_var', $container_classes, $atts);
     1105        return sanitize_text_field( apply_filters('accp_update_container_classes_shortcode_var', $container_classes, $atts) );
    10971106
    10981107    }
     
    14361445        $container_id = array_key_exists('container_id', $args) && !empty($args['container_id']) ? $args['container_id'] : '';
    14371446        $container_id_attr = $container_id && !empty($container_id) ? 'id="'.esc_attr($container_id).'"' : '';
    1438         $container_classes = array_key_exists('container_classes', $args) && !empty($args['container_classes']) ? $args['container_classes'] : '';
     1447        $container_classes = array_key_exists('container_classes', $args) && !empty($args['container_classes']) ? $args['container_classes'] : '';       
    14391448        $list_instance = array_key_exists('list_instance', $args) && !empty($args['list_instance']) ? $args['list_instance'] : '';
    14401449        $list_id = array_key_exists('list_id', $args) && !empty($args['list_id']) ? $args['list_id'] : '';
     
    14441453        $allowed_html = array_key_exists('allowed_html', $args) && !empty($args['allowed_html']) ? $args['allowed_html'] : '';
    14451454
     1455        /**
     1456         * Conditionally add a data-pro-shortcode-id property
     1457         * to the list container.
     1458         */
     1459        $pro_shortcode_id = '';
     1460
     1461        if( true === $is_pro ){
     1462
     1463            $pro_shortcode_id = apply_filters('accp_update_pro_shortcode_id', $pro_shortcode_id, $atts);
     1464
     1465            if( !empty($pro_shortcode_id) ){
     1466
     1467                $shorcode_id_prop = 'data-pro-shortcode-id='.(int)$pro_shortcode_id;               
     1468
     1469            }else{
     1470
     1471                $shorcode_id_prop = '';
     1472
     1473            }
     1474
     1475        }else{
     1476
     1477            $shorcode_id_prop = '';
     1478
     1479        }
     1480
    14461481        $html = '';
    14471482
    1448         $html .= '<div '.$container_id_attr.' class="accp_documents_filelist '.esc_attr($container_classes).'" data-accp-rel-list="'.esc_attr($list_id).'" data-list-id="'.esc_attr($list_instance).'">';
     1483        $html .= '<div '.$container_id_attr.' class="accp_documents_filelist '.esc_attr($container_classes).'" data-accp-rel-list="'.esc_attr($list_id).'" data-list-id="'.esc_attr($list_instance).'" '.esc_attr($shorcode_id_prop).'>';
    14491484
    14501485        /**
     
    15821617                        ob_end_clean();
    15831618
    1584                     }
     1619                    }                   
    15851620
    15861621
     
    16681703        return wp_kses($html, $allowed_html);
    16691704
    1670     }
     1705    }   
    16711706
    16721707
     
    18481883        $thumbnail_size = $this->get_thumbnail_size_var($atts);
    18491884        $align_thumbnail = $this->get_align_thumbnail_var($atts);
    1850         $thumbnail = $thumbnail_size && !empty($thumbnail_size) ? get_the_post_thumbnail($post_id, $thumbnail_size) : get_the_post_thumbnail($post_id);       
     1885        $thumbnail = $thumbnail_size && !empty($thumbnail_size) ? get_the_post_thumbnail($post_id, $thumbnail_size) : get_the_post_thumbnail($post_id);         
    18511886
    18521887        $html = '';
     
    20282063        $allowed_atts = $this->get_default_wp_kses_atts_for_custom_tag();
    20292064
    2030         $allowed_html['input'] = $allowed_atts;        
     2065        $allowed_html['input'] = $allowed_atts;            
    20312066
    20322067        /**
     
    21432178
    21442179
     2180    /**
     2181     * Enqueue the list shortcode stylesheet.
     2182     */
     2183    function enqueue_shortcode_style(){         
     2184       
     2185        $handle = $this->get_style_handle();       
     2186
     2187        wp_enqueue_style($handle, plugin_dir_url( dirname(__FILE__) ) . '/css/ars-constellation-client-portal-list-shortcode-styles.css', false);
     2188       
     2189    }
     2190
     2191
     2192    /**
     2193     * Get the shortcode stylesheet handle
     2194     * for enqueuing and targeting.
     2195     *
     2196     * @return string $handle - The stylesheet handle.
     2197     */
     2198    function get_style_handle(){
     2199
     2200        return 'accp-list-shortcode-style';
     2201
     2202    }
     2203
     2204
    21452205}
Note: See TracChangeset for help on using the changeset viewer.