Plugin Directory

Changeset 2967470


Ignore:
Timestamp:
09/15/2023 11:29:25 AM (3 years ago)
Author:
jlil
Message:

'FixHomeURLInsights'

Location:
postpeek/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • postpeek/trunk/postpeek.php

    r2967453 r2967470  
    44 * Plugin Name: PostPeek
    55 * Description: PostPeek: Immediate Post Insights, a convenient plugin that adds a direct link to search console stats for each post.
    6  * Version: 1.1.1
     6 * Version: 1.1.2
    77 * Tested up to: 6.3
    88 * Author: Jlil
     
    6969        // Define the link based on whether the user is in the admin area or the frontend
    7070        // Determine the URL to point to based on the current page context
     71        $home_url = esc_url($home_url);
     72        $home_url_with_slash = trailingslashit($home_url);
     73
    7174        if (is_admin()) {
    72             $page_url = '&page=!' . esc_url($home_url);
     75            $page_url = '&page=!' . $home_url_with_slash;
    7376        } elseif (is_home() || is_front_page() || is_search()) {
    74             $page_url = '&page=!' . esc_url($home_url);
     77            $page_url = '&page=!' . $home_url_with_slash;
    7578        } elseif (is_single() || is_page()) {
    7679            $page_url = '&page=!' . esc_url(get_permalink());
     
    7982            $page_url = '&page=!' . esc_url(get_term_link($term));
    8083        } else {
    81             $page_url = '&page=!' . esc_url($home_url); // Fallback to home URL
     84            $page_url = '&page=!' . $home_url_with_slash; // Fallback to home URL
    8285        }
    8386
  • postpeek/trunk/readme.txt

    r2967453 r2967470  
    55Requires at least: 4.0
    66Tested up to: 6.3
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88License: GPL-2.0-or-later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8686== Changelog ==
    8787
     88= 1.1.2 [15-09-2023] =
     89* Fixed a bug related to homepage search console url.
     90
    8891= 1.1.1 [15-09-2023] =
    8992* Added "Admin Bar Search Console Link" feature.
Note: See TracChangeset for help on using the changeset viewer.