Version Description
bugfix: load Javascript for Block only when needed
Download this release
Release Info
Developer | petersplugins |
Plugin | 404page – your smart custom 404 error page |
Version | 11.4.1 |
Comparing to | |
See all releases |
Code changes from version 11.4.0 to 11.4.1
- 404page.php +1 -1
- block.json +1 -1
- block.php +13 -7
- loader.php +1 -1
- readme.txt +48 -41
404page.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* Plugin Name: 404page - your smart custom 404 error page
|
10 |
* Plugin URI: https://petersplugins.com/404page/
|
11 |
* Description: Custom 404 the easy way! Set any page as custom 404 error page. No coding needed. Works with (almost) every Theme.
|
12 |
-
* Version: 11.4.
|
13 |
* Author: Peter Raschendorfer
|
14 |
* Author URI: https://petersplugins.com
|
15 |
* Text Domain: 404page
|
9 |
* Plugin Name: 404page - your smart custom 404 error page
|
10 |
* Plugin URI: https://petersplugins.com/404page/
|
11 |
* Description: Custom 404 the easy way! Set any page as custom 404 error page. No coding needed. Works with (almost) every Theme.
|
12 |
+
* Version: 11.4.1
|
13 |
* Author: Peter Raschendorfer
|
14 |
* Author URI: https://petersplugins.com
|
15 |
* Text Domain: 404page
|
block.json
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
"title": "URL causing 404 error",
|
6 |
"category": "widgets",
|
7 |
"icon": "editor-unlink",
|
8 |
-
"version": "11.4.
|
9 |
"textdomain": "404page",
|
10 |
"attributes": {
|
11 |
"urltype": {
|
5 |
"title": "URL causing 404 error",
|
6 |
"category": "widgets",
|
7 |
"icon": "editor-unlink",
|
8 |
+
"version": "11.4.1",
|
9 |
"textdomain": "404page",
|
10 |
"attributes": {
|
11 |
"urltype": {
|
block.php
CHANGED
@@ -15,13 +15,6 @@ if ( ! defined( 'WPINC' ) ) {
|
|
15 |
add_action( 'init', function() {
|
16 |
|
17 |
if ( function_exists('register_block_type_from_metadata' ) ) {
|
18 |
-
|
19 |
-
wp_enqueue_script(
|
20 |
-
'404page-block',
|
21 |
-
pp_404page()->get_asset_url( 'js', 'block.js' ),
|
22 |
-
[ 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor' ],
|
23 |
-
pp_404page()->get_plugin_version()
|
24 |
-
);
|
25 |
|
26 |
register_block_type_from_metadata( __DIR__, [
|
27 |
'render_callback' => function( $atts ) {
|
@@ -32,4 +25,17 @@ add_action( 'init', function() {
|
|
32 |
|
33 |
}
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
} );
|
15 |
add_action( 'init', function() {
|
16 |
|
17 |
if ( function_exists('register_block_type_from_metadata' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
register_block_type_from_metadata( __DIR__, [
|
20 |
'render_callback' => function( $atts ) {
|
25 |
|
26 |
}
|
27 |
|
28 |
+
} );
|
29 |
+
|
30 |
+
|
31 |
+
// Moved from init to enqueue_block_editor_assets in 11.4.1
|
32 |
+
add_action( 'enqueue_block_editor_assets', function() {
|
33 |
+
|
34 |
+
wp_enqueue_script(
|
35 |
+
'404page-block',
|
36 |
+
pp_404page()->get_asset_url( 'js', 'block.js' ),
|
37 |
+
[ 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor' ],
|
38 |
+
pp_404page()->get_plugin_version()
|
39 |
+
);
|
40 |
+
|
41 |
} );
|
loader.php
CHANGED
@@ -56,7 +56,7 @@ function pp_404page() {
|
|
56 |
'slug' => pathinfo( dirname( __FILE__ ) . '/404page.php', PATHINFO_FILENAME ),
|
57 |
'name' => '404page - your smart custom 404 error page',
|
58 |
'shortname' => '404page',
|
59 |
-
'version' => '11.4.
|
60 |
) );
|
61 |
|
62 |
}
|
56 |
'slug' => pathinfo( dirname( __FILE__ ) . '/404page.php', PATHINFO_FILENAME ),
|
57 |
'name' => '404page - your smart custom 404 error page',
|
58 |
'shortname' => '404page',
|
59 |
+
'version' => '11.4.1'
|
60 |
) );
|
61 |
|
62 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: petersplugins
|
3 |
Tags: page, 404, error, error page, 404 page, page not found, page not found error, 404 error page, missing, broken link, template, 404 link, seo, custom 404, custom 404 page, custom 404 error, custom 404 error page, customize 404, customize 404 page, customize 404 error page, classicpress
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 6.
|
6 |
-
Stable tag: 11.4.
|
7 |
Requires PHP: 5.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -57,6 +57,44 @@ The only requirement for this plugin is that you change the Permalink Structure
|
|
57 |
|
58 |
["Compatibility Mode" explained](https://youtu.be/wqSepDyQeqY)
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
== Compatibility ==
|
61 |
|
62 |
= The 404page plugin was sucessfully tested by the author with the following themes =
|
@@ -102,22 +140,6 @@ The only requirement for this plugin is that you change the Permalink Structure
|
|
102 |
* [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) (Read more about [WP Super Cache Compatibility](http://petersplugins.com/docs/404page/#wp_super_cache))
|
103 |
* [WPML WordPress Multilingual Plugin](https://wpml.org/) ([officially approved by WPML team](https://wpml.org/plugin/404page/))
|
104 |
|
105 |
-
== Block & Shortcode ==
|
106 |
-
|
107 |
-
= Block =
|
108 |
-
The Plugin offers a block "URL causing 404 error" for the block-based editor to show the URL that caused the error. The block offers three display options:
|
109 |
-
|
110 |
-
* "Page" to show the page including path ( e.g. does/not/exist )
|
111 |
-
* "Domain Path" to show the URL without protocol and parameters ( e.g. example.com/does/not/exist )
|
112 |
-
* "Full" to show the complete URL ( e.g. https://example.com/does/not/exist?p=1 )
|
113 |
-
|
114 |
-
= Shortcode =
|
115 |
-
The Plugin offers a shortcode "pp_404_url" for the classic editor to show the URL that caused the error. There are three possible options:
|
116 |
-
|
117 |
-
* [pp_404_url page] to show the page including path ( e.g. does/not/exist )
|
118 |
-
* [pp_404_url domainpath] to show the URL without protocol and parameters ( e.g. example.com/does/not/exist )
|
119 |
-
* [pp_404_url] or [pp_404_url full] to show the complete URL ( e.g. https://example.com/does/not/exist?p=1 )
|
120 |
-
|
121 |
== For developers ==
|
122 |
|
123 |
= Action Hook =
|
@@ -127,6 +149,7 @@ The plugin adds an action hook 404page_after_404 which you can use to add extra
|
|
127 |
If the 404page plugin is installed and activated it defines the PHP constant PP_404. Check existence of it to detect the 404page plugin.
|
128 |
|
129 |
= Functions =
|
|
|
130 |
The Plugin provides the following functions:
|
131 |
|
132 |
* pp_404_is_active() to check if there is a custom 404 page selected and the selected page exists
|
@@ -141,30 +164,8 @@ The Plugin provides the following functions:
|
|
141 |
[Read more](http://petersplugins.com/docs/404page/#functions)
|
142 |
|
143 |
= Native Mode =
|
144 |
-
If you are a theme developer you can add native support for the 404page plugin to your theme for full control. [Read more](http://petersplugins.com/docs/404page/#theme_native_support).
|
145 |
-
|
146 |
-
== Do you like this plugin? ==
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
== Plugin Privacy Information ==
|
151 |
-
|
152 |
-
* This plugin does not set cookies
|
153 |
-
* This plugin does not collect or store any data
|
154 |
-
* This plugin does not send any data to external servers
|
155 |
-
|
156 |
-
[Peters' Plugins Privacy Information Page](https://petersplugins.com/plugin-privacy-information/)
|
157 |
-
|
158 |
-
== ClassicPress ==
|
159 |
-
|
160 |
-
This plugin is compatible with [ClassicPress](https://www.classicpress.net/).
|
161 |
-
|
162 |
-
== More plugins from Peter ==
|
163 |
-
|
164 |
-
* **[hashtagger](https://wordpress.org/plugins/hashtagger/)** - Use hashtags in WordPress
|
165 |
-
* **[smart Archive Page Remove](https://wordpress.org/plugins/smart-archive-page-remove/)** - Completely remove unwated Archive Pages from your Blog
|
166 |
-
* **[smart User Slug Hider](https://wordpress.org/plugins/smart-user-slug-hider/)** - Hide usernames in author pages URLs to enhance security
|
167 |
-
* [See all](https://profiles.wordpress.org/petersplugins/#content-plugins)
|
168 |
|
169 |
== Screenshots ==
|
170 |
|
@@ -195,6 +196,9 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
|
|
195 |
|
196 |
== Changelog ==
|
197 |
|
|
|
|
|
|
|
198 |
= 11.4.0 (2022-10-13) =
|
199 |
* Block added
|
200 |
* Shortcode added
|
@@ -397,6 +401,9 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
|
|
397 |
|
398 |
== Upgrade Notice ==
|
399 |
|
|
|
|
|
|
|
400 |
= 11.4.0 =
|
401 |
new block, new shortcode, new function
|
402 |
|
2 |
Contributors: petersplugins
|
3 |
Tags: page, 404, error, error page, 404 page, page not found, page not found error, 404 error page, missing, broken link, template, 404 link, seo, custom 404, custom 404 page, custom 404 error, custom 404 error page, customize 404, customize 404 page, customize 404 error page, classicpress
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 6.1
|
6 |
+
Stable tag: 11.4.1
|
7 |
Requires PHP: 5.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
57 |
|
58 |
["Compatibility Mode" explained](https://youtu.be/wqSepDyQeqY)
|
59 |
|
60 |
+
== Block & Shortcode ==
|
61 |
+
|
62 |
+
= Block =
|
63 |
+
|
64 |
+
The Plugin offers a block "URL causing 404 error" for the block-based editor to show the URL that caused the error. The block offers three display options:
|
65 |
+
|
66 |
+
* "Page" to show the page including path ( e.g. does/not/exist )
|
67 |
+
* "Domain Path" to show the URL without protocol and parameters ( e.g. example.com/does/not/exist )
|
68 |
+
* "Full" to show the complete URL ( e.g. https://example.com/does/not/exist?p=1 )
|
69 |
+
|
70 |
+
= Shortcode =
|
71 |
+
|
72 |
+
The Plugin offers a shortcode "pp_404_url" for the classic editor to show the URL that caused the error. There are three possible options:
|
73 |
+
|
74 |
+
* [pp_404_url page] to show the page including path ( e.g. does/not/exist )
|
75 |
+
* [pp_404_url domainpath] to show the URL without protocol and parameters ( e.g. example.com/does/not/exist )
|
76 |
+
* [pp_404_url] or [pp_404_url full] to show the complete URL ( e.g. https://example.com/does/not/exist?p=1 )
|
77 |
+
|
78 |
+
== Do you like this plugin? ==
|
79 |
+
|
80 |
+
I spend some of my precious free time developing and maintaining my free WordPress plugins. You don’t need to make a donation. No money, no beer, no coffee. If you like this plugin then please do me a favor and [give it a good rating](https://wordpress.org/support/plugin/404page/reviews/). Thanks.
|
81 |
+
|
82 |
+
== Plugin Privacy Information ==
|
83 |
+
|
84 |
+
* This plugin does not set cookies
|
85 |
+
* This plugin does not collect or store any data
|
86 |
+
* This plugin does not send any data to external servers
|
87 |
+
|
88 |
+
[Peters' Plugins Privacy Information Page](https://petersplugins.com/plugin-privacy-information/)
|
89 |
+
|
90 |
+
== ClassicPress ==
|
91 |
+
|
92 |
+
This plugin is compatible with [ClassicPress](https://www.classicpress.net/).
|
93 |
+
|
94 |
+
== More plugins from Peter ==
|
95 |
+
|
96 |
+
Take a look at [my other plugins](https://profiles.wordpress.org/petersplugins/#content-plugins)
|
97 |
+
|
98 |
== Compatibility ==
|
99 |
|
100 |
= The 404page plugin was sucessfully tested by the author with the following themes =
|
140 |
* [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) (Read more about [WP Super Cache Compatibility](http://petersplugins.com/docs/404page/#wp_super_cache))
|
141 |
* [WPML WordPress Multilingual Plugin](https://wpml.org/) ([officially approved by WPML team](https://wpml.org/plugin/404page/))
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
== For developers ==
|
144 |
|
145 |
= Action Hook =
|
149 |
If the 404page plugin is installed and activated it defines the PHP constant PP_404. Check existence of it to detect the 404page plugin.
|
150 |
|
151 |
= Functions =
|
152 |
+
|
153 |
The Plugin provides the following functions:
|
154 |
|
155 |
* pp_404_is_active() to check if there is a custom 404 page selected and the selected page exists
|
164 |
[Read more](http://petersplugins.com/docs/404page/#functions)
|
165 |
|
166 |
= Native Mode =
|
|
|
|
|
|
|
167 |
|
168 |
+
If you are a theme developer you can add native support for the 404page plugin to your theme for full control. [Read more](http://petersplugins.com/docs/404page/#theme_native_support).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
== Screenshots ==
|
171 |
|
196 |
|
197 |
== Changelog ==
|
198 |
|
199 |
+
= 11.4.1 (2022-10-16) =
|
200 |
+
* bugfix: load Javascript for Block only when needed
|
201 |
+
|
202 |
= 11.4.0 (2022-10-13) =
|
203 |
* Block added
|
204 |
* Shortcode added
|
401 |
|
402 |
== Upgrade Notice ==
|
403 |
|
404 |
+
= 11.4.1 =
|
405 |
+
bugfix: load Javascript for Block only when needed
|
406 |
+
|
407 |
= 11.4.0 =
|
408 |
new block, new shortcode, new function
|
409 |
|