404page – your smart custom 404 error page - Version 11.0.5

Version Description

bugfix for Yoast SEO XML Sitemap

Download this release

Release Info

Developer petersplugins
Plugin Icon 128x128 404page – your smart custom 404 error page
Version 11.0.5
Comparing to
See all releases

Code changes from version 11.0.4 to 11.0.5

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.0.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.0.5
13
  * Author: Peter Raschendorfer
14
  * Author URI: https://petersplugins.com
15
  * Text Domain: 404page
assets/css/404page-ui.css CHANGED
@@ -49,6 +49,29 @@
49
  opacity: 0.8;
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  /* Some changes for Lity to overlay Admin Bar */
54
  .lity, .lity-wrap {
49
  opacity: 0.8;
50
  }
51
 
52
+ .pp-admin-page-wrapper .form-table td .pp-404page-info {
53
+ display: inline-block;
54
+ line-height: 20px;
55
+ margin: 20px 12px 0 12px;
56
+ background-color: #1a1a1a;
57
+ color: #fff;
58
+ padding: 6px;
59
+ }
60
+
61
+ .pp-admin-page-wrapper .form-table td .pp-404page-info:before {
62
+ font-family: dashicons;
63
+ display: inline-block;
64
+ font-weight: 400;
65
+ font-style: normal;
66
+ speak: none;
67
+ width: 20px;
68
+ height: 20px;
69
+ font-size: 20px;
70
+ vertical-align: top;
71
+ text-align: center;
72
+ content: "\f348";
73
+ margin-right: 12px;
74
+ }
75
 
76
  /* Some changes for Lity to overlay Admin Bar */
77
  .lity, .lity-wrap {
inc/class-404page-admin.php CHANGED
@@ -178,6 +178,24 @@ if ( !class_exists( 'PP_404Page_Admin' ) ) {
178
  echo '<div id="404page_current_value" style="display: none">' . $this->settings()->get( 'page_id' ) . '</div>';
179
  echo '<p class="submit"><input type="button" name="edit_404_page" id="edit_404_page" class="button secondary" value="' . esc_html__( 'Edit Page', '404page' ) . '" />&nbsp;<input type="button" name="test_404_page" id="test_404_page" class="button secondary" value="' . esc_html__( 'Test 404 error', '404page' ) . '" /></p>';
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
182
 
183
 
178
  echo '<div id="404page_current_value" style="display: none">' . $this->settings()->get( 'page_id' ) . '</div>';
179
  echo '<p class="submit"><input type="button" name="edit_404_page" id="edit_404_page" class="button secondary" value="' . esc_html__( 'Edit Page', '404page' ) . '" />&nbsp;<input type="button" name="test_404_page" id="test_404_page" class="button secondary" value="' . esc_html__( 'Test 404 error', '404page' ) . '" /></p>';
180
 
181
+ if ( defined( 'WPSEO_VERSION' ) ) {
182
+
183
+ echo '<p class="pp-404page-info">';
184
+
185
+ if ( $this->settings()->get( 'fire_error' ) ) {
186
+
187
+ echo esc_html__( 'Yoast SEO Plugin detected. Your 404 page is automatically excluded from the XML sitemap created by Yoast (if you have actiavted this feature).', '404page' );
188
+
189
+ } else {
190
+
191
+ echo esc_html__( 'Yoast SEO Plugin detected. Your 404 page is NOT automatically excluded from the XML sitemap created by Yoast, because you disabled the option "Send an 404 error if the page is accessed directly by its URL" on the "Advanced" tab.', '404page' );
192
+
193
+ }
194
+
195
+ echo '</p>';
196
+
197
+ }
198
+
199
  }
200
 
201
 
inc/class-404page.php CHANGED
@@ -152,8 +152,10 @@ if ( !class_exists( 'PP_404Page' ) ) {
152
  // @since 6
153
  if ( $this->settings()->get( 'fire_error' ) ) {
154
 
155
- add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', function () {
156
- return array( $this->settings()->get( 'page_id' ) );
 
 
157
  } );
158
 
159
  }
@@ -934,7 +936,7 @@ if ( !class_exists( 'PP_404Page' ) ) {
934
 
935
  } else {
936
 
937
- $pageids = array( $this->get_page_id() );
938
 
939
  }
940
 
152
  // @since 6
153
  if ( $this->settings()->get( 'fire_error' ) ) {
154
 
155
+ add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', function ( $alreadyExcluded ) {
156
+ // as of 11.0.5 we add the page ID to the array of already excluded pages
157
+ // plus we exclude the 404 page in all languages
158
+ return array_merge( $alreadyExcluded, $this->get_all_page_ids() );
159
  } );
160
 
161
  }
936
 
937
  } else {
938
 
939
+ $pageids = array( $this->settings()->get( 'page_id' ) );
940
 
941
  }
942
 
loader.php CHANGED
@@ -36,7 +36,7 @@ function pp_404page() {
36
  'slug' => pathinfo( dirname( __FILE__ ) . '/404page.php', PATHINFO_FILENAME ),
37
  'name' => '404page - your smart custom 404 error page',
38
  'shortname' => '404page',
39
- 'version' => '11.0.4'
40
  ) );
41
 
42
  }
36
  'slug' => pathinfo( dirname( __FILE__ ) . '/404page.php', PATHINFO_FILENAME ),
37
  'name' => '404page - your smart custom 404 error page',
38
  'shortname' => '404page',
39
+ 'version' => '11.0.5'
40
  ) );
41
 
42
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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: 5.2
6
- Stable tag: 11.0.4
7
  Requires PHP: 5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -157,14 +157,18 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
157
 
158
  == Changelog ==
159
 
 
 
 
 
160
  = 11.0.4 (2019-10-06) =
161
- * bug fix for WPML
162
 
163
  = 11.0.3 (2019-09-01) =
164
- * bug fix for REST API call (see [here](https://wordpress.org/support/topic/bug-woocommerce-rest-api-500-error/))
165
 
166
  = 11.0.2 (2019-08-30) =
167
- * two bugs fixed (see [here](https://wordpress.org/support/topic/version-11-0-1-error-in-log-file/) and [here](https://wordpress.org/support/topic/cant-activate-compatibility-mode/)
168
 
169
  = 11.0.1 (2019-08-13) =
170
  * fix for PHP 7.1 - __construct() access level in subclass - this is an PHP error that was fixed in PHP 7.2, but I've changed my code to also work with PHP 7.1
@@ -214,7 +218,7 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
214
  * minor code- & UI-improvements
215
 
216
  = 4 (2018-03-05) =
217
- * bugfix for bbPress ([See Topic](https://wordpress.org/support/topic/not-fully-bbpress-compatible/)
218
 
219
  = 3.3 (2017-11-16) =
220
  * support for right-to-left-languages added
@@ -224,8 +228,8 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
224
  * new feature to send an HTTP 410 error for deleted objects
225
 
226
  = 3.1 (2017-07-24) =
227
- * bugfix for Polylang ([See Topic](https://wordpress.org/support/topic/3-0-breaks-polylang-support/))
228
- * bugfix for CLI ([See Topic](https://wordpress.org/support/topic/uninstall-php-from-cli-failed/))
229
  * add debug class to body tag
230
  * also add body classes for Customizr theme
231
  * do not add error404 class if already exists
@@ -243,14 +247,14 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
243
  * do not fire a 404 in Compatibility Mode if the [DW Question & Answer plugin by DesignWall](https://www.designwall.com/wordpress/plugins/dw-question-answer/) is active and a question has no answers
244
 
245
  = 2.4 (2017-03-08) =
246
- * ensure that all core files are loaded properly ([See Topic](https://wordpress.org/support/topic/had-to-deactivate-404page-to-make-wordpress-correctly))
247
- * Polylang plugin does no longer require Compatibility Mode ([See Topic](https://wordpress.org/support/topic/still-displaying-the-themes-404-page-with-polylang/))
248
  * hide all translations if WPML is installed and "Hide 404 page" is active (thanks to the [WPML](https://wpml.org/) guys for pointing me at this)
249
- * post status fix ([See topic](https://wordpress.org/support/topic/doesnt-work-with-custom-post-status/))
250
  * [Enfold theme](https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990?ref=petersplugins) issue fix (thanks to the guys at [Kriesi.at](http://www.kriesi.at/) for supporting me)
251
 
252
  = 2.3 (2016-11-21) =
253
- * a few minor bug fixes solve some problems with page templates in certain combinations
254
 
255
  = 2.2 (2016-09-26) =
256
  * automatic switch to Compatibility Mode for several plugins removed
@@ -304,11 +308,14 @@ Please use the [Support Forum](https://wordpress.org/support/plugin/404page).
304
 
305
  == Upgrade Notice ==
306
 
 
 
 
307
  = 11.0.4 =
308
- bug fix for WPML
309
 
310
  = 11.0.3 =
311
- bug fix for REST API call
312
 
313
  = 11.0.2 =
314
  two bugs fixed
@@ -374,7 +381,7 @@ Hide 404 page from search results, compatibility with DW Question & Answer plugi
374
  Version 2.4 fixes several issues. See [changelog](https://wordpress.org/plugins/404page/changelog/) for details.
375
 
376
  = 2.3 =
377
- A few minor bug fixes solve some problems with page templates in certain combinations.
378
 
379
  = 2.2 =
380
  Enhanced compatibility. Automated Operating Method select removed. Several fixes.
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: 5.2
6
+ Stable tag: 11.0.5
7
  Requires PHP: 5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
157
 
158
  == Changelog ==
159
 
160
+ = 11.0.5 (2019-10-22) =
161
+ * bugfix for Yoast SEO XML Sitemap ([see topic](https://wordpress.org/support/topic/small-bug-with-wpseo_exclude_from_sitemap_by_post_ids/))
162
+ * added a note to settings page if Yoast SEO is active
163
+
164
  = 11.0.4 (2019-10-06) =
165
+ * bugfix for WPML
166
 
167
  = 11.0.3 (2019-09-01) =
168
+ * bugfix for REST API call (see [here](https://wordpress.org/support/topic/bug-woocommerce-rest-api-500-error/))
169
 
170
  = 11.0.2 (2019-08-30) =
171
+ * two bugs fixed (see [here](https://wordpress.org/support/topic/version-11-0-1-error-in-log-file/) and [here](https://wordpress.org/support/topic/cant-activate-compatibility-mode/))
172
 
173
  = 11.0.1 (2019-08-13) =
174
  * fix for PHP 7.1 - __construct() access level in subclass - this is an PHP error that was fixed in PHP 7.2, but I've changed my code to also work with PHP 7.1
218
  * minor code- & UI-improvements
219
 
220
  = 4 (2018-03-05) =
221
+ * bugfix for bbPress ([see topic](https://wordpress.org/support/topic/not-fully-bbpress-compatible/))
222
 
223
  = 3.3 (2017-11-16) =
224
  * support for right-to-left-languages added
228
  * new feature to send an HTTP 410 error for deleted objects
229
 
230
  = 3.1 (2017-07-24) =
231
+ * bugfix for Polylang ([see topic](https://wordpress.org/support/topic/3-0-breaks-polylang-support/))
232
+ * bugfix for CLI ([see topic](https://wordpress.org/support/topic/uninstall-php-from-cli-failed/))
233
  * add debug class to body tag
234
  * also add body classes for Customizr theme
235
  * do not add error404 class if already exists
247
  * do not fire a 404 in Compatibility Mode if the [DW Question & Answer plugin by DesignWall](https://www.designwall.com/wordpress/plugins/dw-question-answer/) is active and a question has no answers
248
 
249
  = 2.4 (2017-03-08) =
250
+ * ensure that all core files are loaded properly ([see topic](https://wordpress.org/support/topic/had-to-deactivate-404page-to-make-wordpress-correctly))
251
+ * Polylang plugin does no longer require Compatibility Mode ([see topic](https://wordpress.org/support/topic/still-displaying-the-themes-404-page-with-polylang/))
252
  * hide all translations if WPML is installed and "Hide 404 page" is active (thanks to the [WPML](https://wpml.org/) guys for pointing me at this)
253
+ * post status fix ([see topic](https://wordpress.org/support/topic/doesnt-work-with-custom-post-status/))
254
  * [Enfold theme](https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990?ref=petersplugins) issue fix (thanks to the guys at [Kriesi.at](http://www.kriesi.at/) for supporting me)
255
 
256
  = 2.3 (2016-11-21) =
257
+ * a few minor bugfixes solve some problems with page templates in certain combinations
258
 
259
  = 2.2 (2016-09-26) =
260
  * automatic switch to Compatibility Mode for several plugins removed
308
 
309
  == Upgrade Notice ==
310
 
311
+ = 11.0.5 =
312
+ bugfix for Yoast SEO XML Sitemap
313
+
314
  = 11.0.4 =
315
+ bugfix for WPML
316
 
317
  = 11.0.3 =
318
+ bugfix for REST API call
319
 
320
  = 11.0.2 =
321
  two bugs fixed
381
  Version 2.4 fixes several issues. See [changelog](https://wordpress.org/plugins/404page/changelog/) for details.
382
 
383
  = 2.3 =
384
+ A few minor bugfixes solve some problems with page templates in certain combinations.
385
 
386
  = 2.2 =
387
  Enhanced compatibility. Automated Operating Method select removed. Several fixes.