Changeset 3454044
- Timestamp:
- 02/04/2026 07:06:31 PM (2 weeks ago)
- Location:
- expertfile-expert-content-templates/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (1 diff)
-
expertfile.php (modified) (4 diffs)
-
public/class-expertfile-public.php (modified) (14 diffs)
-
public/classes/Utils.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
expertfile-expert-content-templates/trunk/README.txt
r3243436 r3454044 4 4 Donate link: https://expertfile.com/ 5 5 Tags: Experts, Staff Directory, Expert Profiles, Staff Profiles, Expert Directory 6 Tested up to: 6. 57 Stable tag: 1.0. 48 Requires PHP: 7. 06 Tested up to: 6.9.1 7 Stable tag: 1.0.50 8 Requires PHP: 7.4 or higher 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
expertfile-expert-content-templates/trunk/expertfile.php
r3243920 r3454044 11 11 * Plugin URI: https://expertfile.com/wordpress 12 12 * Description: The easiest most powerful way to add expert content to your website from directories to profiles & more... 13 * Version: 1.0. 4913 * Version: 1.0.50 14 14 * Author: ExpertFile 15 15 * Author URI: https://expertfile.com … … 20 20 */ 21 21 22 // error_reporting(E_ALL); 23 // ini_set('display_errors', '1'); 22 24 23 25 24 if ( ! defined( 'WPINC' ) ) { … … 27 26 } 28 27 29 define( 'EXPERTFILE_VERSION', '1.0. 3' );28 define( 'EXPERTFILE_VERSION', '1.0.50' ); 30 29 define( 'EXPERTFILE_PLUGIN_NAME', 'expertfile' ); 31 30 define( 'EXPERTFILE_API_ENDPOINT', 'https://public-api.expertfile.com' ); … … 86 85 function run_expertfile() { 87 86 $plugin = new Expertfile(); 88 87 89 88 $plugin->run(); 90 89 } -
expertfile-expert-content-templates/trunk/public/class-expertfile-public.php
r3084548 r3454044 5 5 private $plugin_name; 6 6 private $version; 7 private $expert_profile_data; 8 private $spotlight_post_data; 9 private $expertanswer_post_data; 10 private $include_title_tag; 11 private $expert_directory_access; 7 12 8 13 function __construct($plugin_name, $version) … … 55 60 $access_options = get_option($this->plugin_name . '-api-access'); 56 61 57 $token = $access_options['token'];62 $token = is_array($access) ? ($access['token'] ?? null) : null; 58 63 // phpcs:ignore 59 64 $sanitized = ExpertFileECT\Utils::sanitize($_POST); … … 151 156 $options = get_option($this->plugin_name . '-api-credentials-settings'); 152 157 $access_options = get_option($this->plugin_name . '-api-access'); 153 $token = $access_options['token'];158 $token = is_array($access) ? ($access['token'] ?? null) : null; 154 159 155 160 $qs = isset($_SERVER['REQUEST_URI']) ? ExpertFileECT\Utils::get_query_string_arr($_SERVER['REQUEST_URI']) : array(); … … 259 264 $access_options = get_option($this->plugin_name . '-api-access'); 260 265 261 $token = $access_options['token'];266 $token = is_array($access) ? ($access['token'] ?? null) : null; 262 267 // phpcs:ignore 263 268 $sanitized = ExpertFileECT\Utils::sanitize($_POST); … … 304 309 $access_options = get_option($this->plugin_name . '-api-access'); 305 310 311 306 312 $inquiry_page_url = ($inquiry_page_url == "" ? $url_options['inquiry-url'] : $inquiry_page_url); 307 313 $spotlight_page_url = ($spotlight_page_url == "" ? $url_options['spotlight-url'] : $spotlight_page_url); 308 314 309 $token = $access_options['token']; 315 $token = is_array($access_options) ? ($access_options['token'] ?? null) : null; 316 310 317 $username = $qs['username'] ?? get_query_var('username') ?? null; 311 318 … … 359 366 $sanitized = ExpertFileECT\Utils::sanitize($_POST); 360 367 361 $token = $access_options['token'];368 $token = is_array($access) ? ($access['token'] ?? null) : null; 362 369 $username = $sanitized['username']; 363 370 $page_number = $sanitized['page_number'] ?? 1; … … 396 403 $options = get_option($this->plugin_name . '-api-credentials-settings'); 397 404 $access = get_option($this->plugin_name . '-api-access'); 398 $token = $access['token'];405 $token = is_array($access) ? ($access['token'] ?? null) : null; 399 406 400 407 $id = $options['organization-id']; … … 448 455 $options = get_option($this->plugin_name . '-api-credentials-settings'); 449 456 $access = get_option($this->plugin_name . '-api-access'); 450 $token = $access['token'];457 $token = is_array($access) ? ($access['token'] ?? null) : null; 451 458 452 459 $spotlight = new ExpertFileECT\Spotlight( … … 493 500 $url_options = get_option($this->plugin_name . '-url-overrides-settings'); 494 501 495 $token = $access['token'];502 $token = is_array($access) ? ($access['token'] ?? null) : null; 496 503 $qs = isset($_SERVER['REQUEST_URI']) ? ExpertFileECT\Utils::get_query_string_arr(sanitize_text_field($_SERVER['REQUEST_URI'])) : array(); 497 504 … … 551 558 $options = get_option($this->plugin_name . '-api-credentials-settings'); 552 559 $access = get_option($this->plugin_name . '-api-access'); 553 $token = $access['token'];560 $token = is_array($access) ? ($access['token'] ?? null) : null; 554 561 // phpcs:ignore 555 562 $sanitized = ExpertFileECT\Utils::sanitize($_POST); … … 597 604 $qs = isset($_SERVER['REQUEST_URI']) ? ExpertFileECT\Utils::get_query_string_arr(sanitize_text_field($_SERVER['REQUEST_URI'])) : array(); 598 605 599 $token = $access['token'];606 $token = is_array($access) ? ($access['token'] ?? null) : null; 600 607 601 608 $expertanswer_page_url = ($expertanswer_page_url == "" ? $url_options['expertanswer-url'] : $expertanswer_page_url); … … 645 652 $profile_page_url = ($profile_page_url == "" ? $url_options['profile-url'] : $profile_page_url); 646 653 $qs = isset($_SERVER['REQUEST_URI']) ? ExpertFileECT\Utils::get_query_string_arr(sanitize_text_field($_SERVER['REQUEST_URI'])) : array(); 647 $token = $access['token'];654 $token = is_array($access) ? ($access['token'] ?? null) : null; 648 655 649 656 $post_id = $qs['id'] ?? get_query_var('id') ?? null;; … … 707 714 $url_options = get_option($this->plugin_name . '-url-overrides-settings'); 708 715 709 $token = $access['token'];716 $token = is_array($access) ? ($access['token'] ?? null) : null; 710 717 $profile_page_url = ($profile_page_url == "" ? $url_options['profile-url'] : $profile_page_url); 711 718 … … 743 750 $options = get_option($this->plugin_name . '-api-credentials-settings'); 744 751 $access = get_option($this->plugin_name . '-api-access'); 745 $token = $access['token'];752 $token = is_array($access) ? ($access['token'] ?? null) : null; 746 753 // phpcs:ignore 747 754 $sanitized = ExpertFileECT\Utils::sanitize($_POST); -
expertfile-expert-content-templates/trunk/public/classes/Utils.php
r2973941 r3454044 44 44 // phpcs:ignore 45 45 $page = get_page_by_path($slug); 46 47 46 48 $id = $page->ID; 47 49 $pos = (strpos($url, $parseKey) > strpos($url, '{{encoded}}') && !empty(strpos($url, '{{encoded}}')) ? 2 : 1);
Note: See TracChangeset
for help on using the changeset viewer.