Skip to content

Commit 132eaf4

Browse files
committed
Fix PHPCS issues with HTML import code
1 parent a935c3a commit 132eaf4

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

classes/class-cpt-wplf-form.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,7 @@ protected function override_form_template( $template_content, $form_id ) {
573573
*
574574
* @return void
575575
*/
576-
protected function maybe_persist_override_template( $template, $form_id, $force = false )
577-
{
576+
protected function maybe_persist_override_template( $template, $form_id, $force = false ) {
578577
$hash_transient = 'form_tmpl_hash_' . $form_id;
579578
$template_hash = md5( $template );
580579
$stored_hash = get_transient( $hash_transient );
@@ -588,14 +587,14 @@ protected function maybe_persist_override_template( $template, $form_id, $force
588587

589588
$updated = wp_update_post( array(
590589
'ID' => (int) $form_id,
591-
'post_content' => $template
590+
'post_content' => $template,
592591
) );
593592

594593
add_action( 'save_post', array( $this, 'save_cpt' ) );
595594

596595
// Maybe we should do something else than just silently fail if persisting failed above.
597-
if ($updated) {
598-
set_transient($hash_transient, $template_hash, HOUR_IN_SECONDS * 8);
596+
if ( $updated ) {
597+
set_transient( $hash_transient, $template_hash, HOUR_IN_SECONDS * 8 );
599598
}
600599
}
601600

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)