Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update htaccess WP Rocket missing rules notice #1769

merged 4 commits into from Jun 6, 2019


None yet
2 participants
Copy link

commented Jun 6, 2019

Closes #1555
Closes #1651

  • Check if the WP Rocket rules are already present in the htaccess before displaying the notice
  • Update the notice wording and switch the type from error to warning

@Tabrisrp Tabrisrp added this to the 3.3.5 milestone Jun 6, 2019

@Tabrisrp Tabrisrp requested a review from Screenfeed Jun 6, 2019

@Tabrisrp Tabrisrp self-assigned this Jun 6, 2019

add_filter( 'rocket_htaccess_mod_rewrite', '__return_false' );
$message .= '<p>' . __( 'Don’t worry, WP Rocket’s page caching and settings will still function correctly.', 'rocket' ) . '<br>' . __( 'For optimal performance, adding the following lines into your .htaccess is recommended (not required):', 'rocket' ) . '<br><textarea readonly="readonly" id="rules" name="rules" class="large-text readonly" rows="6">' . esc_textarea( get_rocket_htaccess_marker() ) . '</textarea></p>';

This comment has been minimized.

Copy link

Screenfeed Jun 6, 2019


I don't think that using an id as simple as "rules" on something that can be displayed anywhere is a good idea.

@Screenfeed Screenfeed merged commit 67c6eba into develop Jun 6, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@Screenfeed Screenfeed deleted the fix/1555-htaccess-rules branch Jun 6, 2019

@Tabrisrp Tabrisrp referenced this pull request Jun 10, 2019


3.3.5 #1781

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.