Plugin Directory

Changeset 2942769


Ignore:
Timestamp:
07/24/2023 09:23:31 PM (2 years ago)
Author:
samglover
Message:

1.7.5

Location:
client-power-tools
Files:
110 added
5 edited

Legend:

Unmodified
Added
Removed
  • client-power-tools/trunk/changelog.txt

    r2915970 r2942769  
    22
    33All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com).
     4
     5
     6### 1.7.5 - 2023-07-24
     7
     8#### Added
     9- cpt_is_client_dashboard('additional page') now returns true on additional pages and their descendants.
     10
    411
    512### 1.7.4 - 2023-05-22
  • client-power-tools/trunk/client-power-tools.php

    r2915970 r2942769  
    55 * Plugin URI: https://clientpowertools.com
    66 * Description: Client Power Tools is an easy-to-use client dashboard, project management, and communication portal built for designers, developers, consultants, lawyers, and other professionals.
    7  * Version: 1.7.4
     7 * Version: 1.7.5
    88 * Author: Sam Glover
    99 * Author URI: https://samglover.net
     
    2020 * Constants
    2121 */
    22 define('CLIENT_POWER_TOOLS_PLUGIN_VERSION', '1.7.4');
     22define('CLIENT_POWER_TOOLS_PLUGIN_VERSION', '1.7.5');
    2323define('CLIENT_POWER_TOOLS_DIR_PATH', plugin_dir_path(__FILE__));
    2424define('CLIENT_POWER_TOOLS_DIR_URL', plugin_dir_url(__FILE__));
  • client-power-tools/trunk/common/cpt-common.php

    r2909684 r2942769  
    3737  $client_dashboard_id = get_option('cpt_client_dashboard_page_selection');
    3838  $this_page_id = isset($wp_query->post->ID) ? $wp_query->post->ID : false;
     39 
    3940  if (!$page && $this_page_id && $client_dashboard_id == $this_page_id) return true;
     41
    4042  if ($page) {
    4143    switch($page) {
     
    4951        if (cpt_is_knowledge_base()) return true;
    5052        break;
     53      case 'additional page' || 'additional pages':
     54        $addl_pages_array = get_option('cpt_client_dashboard_addl_pages') ? get_option('cpt_client_dashboard_addl_pages') : false;
     55        if ($addl_pages_array) {
     56          $is_addl_page = false;
     57          $addl_pages_array = explode(',', $addl_pages_array);
     58          foreach ($addl_pages_array as $key => $page_id) {
     59            $page_id = intval(trim($page_id));
     60            if (
     61              $page_id == $this_page_id ||
     62              in_array($page_id, get_post_ancestors($this_page_id))
     63            ) $is_addl_page = true;
     64          }
     65          if ($is_addl_page) return true;
     66        }
     67        break;
    5168    }
    5269  }
     70
    5371  return false;
    5472}
  • client-power-tools/trunk/frontend/cpt-client-dashboard.php

    r2915970 r2942769  
    140140          if ($addl_pages_array) {
    141141            foreach($addl_pages_array as $page_id) {
    142               $page_id = trim($page_id);
     142              $page_id = intval(trim($page_id));
    143143              $classes = 'cpt-nav-menu-item';
    144144              if ($page_id == get_the_ID() || in_array($page_id, get_post_ancestors(get_the_ID()))) $classes .= ' current';
  • client-power-tools/trunk/readme.txt

    r2915970 r2942769  
    116116== Changelog ==
    117117
     118### 1.7.5 - 2023-07-24
     119
     120#### Added
     121- cpt_is_client_dashboard('additional page') now returns true on additional pages and their descendants.
     122
     123
    118124### 1.7.4 - 2023-05-22
    119125
Note: See TracChangeset for help on using the changeset viewer.