Skip to content

Commit

Permalink
more phpcs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Mar 22, 2022
1 parent f0e0648 commit 04190ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion includes/coming-soon.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function add_tool_bar_item( \WP_Admin_Bar $admin_bar ) {
* Load the coming soon page, if necessary.
*/
public function maybe_load_template() {
if ( ! is_user_logged_in() || 'coming_soon' === $_GET['preview'] ) {
if ( ! is_user_logged_in() || 'preview=coming_soon' === $_SERVER['QUERY_STRING'] ) {
$coming_soon = get_option( esc_attr( $this->args['option_name'] ), 'false' );
if ( 'true' === $coming_soon ) {
$this->coming_soon_content( $this->args );
Expand Down
20 changes: 9 additions & 11 deletions includes/template/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
<head>
<meta name="viewport" content="width=device-width">
<meta name="robots" content="noindex, nofollow" />
<title><?php esc_html_e( $args['template_page_title'] ); ?></title>
<title><?php echo esc_html( $args['template_page_title'] ); ?></title>
<script src="<?php echo esc_url( includes_url( 'js/jquery/jquery.js' ) ); //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript ?>"></script>
<style type="text/css">
<?php echo file_get_contents( 'default.css', true ); ?>
</style>
<style type="text/css"><?php echo file_get_contents( 'default.css', true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></style>
<?php if ( isset( $args['template_styles'] ) ) : ?>
<link rel="stylesheet" href="<?php echo esc_url( $args['template_styles'] ); //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript ?>" />
<link rel="stylesheet" href="<?php echo esc_url( $args['template_styles'] ); //phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet ?>" />
<?php endif; ?>
</head>
<body>
Expand All @@ -31,23 +29,23 @@
<h2><?php echo wp_kses_post( $args['template_h2'] ); ?></h2>
<?php if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'subscriptions' ) ) : ?>
<div id="subscribe-text">
<p><?php esc_html_e( $args['template_p'] ); ?></p>
<p><?php echo esc_html( $args['template_p'] ); ?></p>
</div>
<div id="success" class="status-message">
<?php esc_html_e( $args['template_msg_success'] ); ?>
<?php echo esc_html( $args['template_msg_success'] ); ?>
</div>
<div id="error-active" class="status-message">
<?php esc_html_e( $args['template_msg_active'] ); ?>
<?php echo esc_html( $args['template_msg_active'] ); ?>
</div>
<div id="error-invalid" class="status-message">
<?php esc_html_e( $args['template_msg_invalid'] ); ?>
<?php echo esc_html( $args['template_msg_invalid'] ); ?>
</div>
<form action="" method="post" accept-charset="utf-8" id="subscribe">
<input type="hidden" name="action" value="newfold_coming_soon_subscribe">
<?php wp_nonce_field( 'newfold_coming_soon_subscribe_nonce', 'newfold-nonce-coming-soon-subscribe' ); ?>
<span class="inputs email" id="subscribe-email">
<label id="subscribe-label" for="subscribe-field">
<?php esc_html_e( $args['template_email_label']); ?>
<?php echo esc_html( $args['template_email_label'] ); ?>
</label>
<input
type="email"
Expand All @@ -66,7 +64,7 @@
var ajaxscript = {
ajax_url: '<?php echo esc_url( admin_url() ); ?>admin-ajax.php'
};
<?php echo file_get_contents( 'script.js', true ); ?>
<?php echo file_get_contents( 'script.js', true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</script>
<?php endif; // end subscribe form ?>
</div>
Expand Down

0 comments on commit 04190ad

Please sign in to comment.