Skip to content

Commit

Permalink
add some selectors around the default_ttl setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed May 17, 2024
1 parent 9bb777d commit 3367650
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/pantheon-page-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,11 @@ public function action_admin_footer_trigger_plugin_open() {
*/
public function default_ttl_field() {
$disabled = ( has_filter( 'pantheon_cache_default_max_age' ) ) ? ' disabled' : '';
echo wp_kses_post( apply_filters( 'pantheon_cache_default_ttl_field_before_html', '<div class="pantheon_cache_default_max_age">' ) );
echo '<h3>' . esc_html__( 'Default Max Age', 'pantheon-cache' ) . '</h3>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '<p>' . esc_html__( 'Maximum time a cached page will be served. A higher max-age typically improves site performance.', 'pantheon-cache' ) . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '<input type="text" name="' . self::SLUG . '[default_ttl]" value="' . $this->options['default_ttl'] . '" size="7" ' . $disabled . ' /> ' . esc_html__( 'seconds', 'pantheon-cache' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo wp_kses_post( apply_filters( 'pantheon_cache_default_ttl_field_after_html', '</div>' ) );

// Display a message if the setting is disabled.
if ( $disabled ) {
Expand Down

0 comments on commit 3367650

Please sign in to comment.