Changeset 2729665
- Timestamp:
- 05/24/2022 05:37:19 PM (4 years ago)
- Location:
- widgets-for-amazon/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
includes/Plugin.php (modified) (4 diffs)
-
includes/Tools.php (modified) (1 diff)
-
widgets-for-amazon.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
widgets-for-amazon/trunk/README.txt
r2729599 r2729665 7 7 Requires PHP: 7.0 8 8 Tested up to: 5.9 9 Stable tag: 1.0.2 29 Stable tag: 1.0.23 10 10 License: GPLv3 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 52 52 == Changelog == 53 53 54 #### 1.0.2 2- 2022-05-2454 #### 1.0.23 - 2022-05-24 55 55 56 56 - Added support for 404 page. -
widgets-for-amazon/trunk/includes/Plugin.php
r2729585 r2729665 9 9 public static function filter_get_search_form($form): string 10 10 { 11 global $wp_query;12 13 11 //Tools::log_function('filter_get_search_form'); 14 12 15 $is404Page = ($wp_query && $wp_query->query_vars && $wp_query->query_vars['error'] == '404'); 16 //Tools::log_debug('$is404Page: ' . $is404Page); 17 if ($is404Page) 13 if (is_404()) 18 14 { 19 15 $showOn404Page = get_option(Constants::OPTION_SHOW_ON_404_PAGE_NAME, Constants::OPTION_SHOW_ON_404_PAGE_DEFAULT_VALUE); … … 34 30 35 31 // Determine plugin version for JSON request. 32 if (!function_exists('get_plugin_data')) 33 require_once(ABSPATH . 'wp-admin/includes/plugin.php'); 36 34 $plugin_data = get_plugin_data(plugin_dir_path(__DIR__) . Constants::PLUGIN_FILE_NAME); 37 35 $plugin_version = $plugin_data['Version']; … … 44 42 $html = self::create_search_box_html('sf-' . self::$search_form_search_box_index); 45 43 46 if ( $is404Page)44 if (is_404()) 47 45 { 48 46 $query = $_SERVER['REQUEST_URI']; … … 125 123 126 124 // Determine plugin version for JSON request. 125 if (!function_exists('get_plugin_data')) 126 require_once(ABSPATH . 'wp-admin/includes/plugin.php'); 127 127 $plugin_data = get_plugin_data(plugin_dir_path(__DIR__) . Constants::PLUGIN_FILE_NAME); 128 128 $plugin_version = $plugin_data['Version']; -
widgets-for-amazon/trunk/includes/Tools.php
r2729563 r2729665 9 9 self::log_debug($function); 10 10 11 self::log_debug(' is_404: ' . is_404()); 11 12 self::log_debug(' is_active_widget: ' . is_active_widget()); 12 13 self::log_debug(' is_archive: ' . is_archive()); -
widgets-for-amazon/trunk/widgets-for-amazon.php
r2729599 r2729665 5 5 * Plugin URI: https://blog.eggnstone.com/blog/widgets-for-amazon-for-wordpress 6 6 * Description: Widgets for Amazon by eggnstone 7 * Version: 1.0.2 27 * Version: 1.0.23 8 8 * Author: eggnstone 9 9 * Author URI: https://eggnstone.com
Note: See TracChangeset
for help on using the changeset viewer.