Skip to content

Commit

Permalink
Merge pull request #74 from newfold-labs/enhance/enable-skip404-by-de…
Browse files Browse the repository at this point in the history
…fault

Enable Skip 404 by Default
  • Loading branch information
arunshenoy99 authored Jan 22, 2025
2 parents d73f26a + 1fcb0f1 commit c196798
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/Performance.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function add_to_runtime( $sdk ) {
'jetpack_boost_minify_css' => get_option( 'jetpack_boost_status_minify-css', array() ),
'jetpack_boost_minify_css_excludes' => implode( ',', get_option( 'jetpack_boost_ds_minify_css_excludes', array( 'admin-bar', 'dashicons', 'elementor-app' ) ) ),
'install_token' => PluginInstaller::rest_get_plugin_install_hash(),
'skip404' => (bool) get_option( 'newfold_skip_404_handling', false ),
'skip404' => getSkip404Option(),
);

return array_merge( $sdk, array( 'performance' => $values ) );
Expand Down
4 changes: 3 additions & 1 deletion includes/RestApi/SettingsController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace NewfoldLabs\WP\Module\Performance\RestApi;

use NewfoldLabs\WP\Module\Performance\Performance;

/**
* Class Settings
*
Expand Down Expand Up @@ -77,7 +79,7 @@ public function set_options( $request ) {

switch ( $field['id'] ) {
case 'skip404':
$result = update_option( 'newfold_skip_404_handling', $field['value'] );
$result = update_option( Performance::OPTION_SKIP_404, $field['value'] );
break;

default:
Expand Down

0 comments on commit c196798

Please sign in to comment.