chore: lint PHP files

This commit is contained in:
Ben Goldsworthy 2021-04-25 18:49:35 +01:00
parent 8cf8d2c16e
commit 176e32a65a
5 changed files with 31 additions and 29 deletions

View file

@ -495,7 +495,9 @@ abstract class Footnotes_Layout_Engine {
'<option value="%s" %s>%s</option>', '<option value="%s" %s>%s</option>',
$l_str_value, $l_str_value,
// Only check for equality, not identity, WRT backlink symbol arrows. // Only check for equality, not identity, WRT backlink symbol arrows.
// phpcs:disable WordPress.PHP.StrictComparisons.LooseComparison
$l_str_value == $l_arr_data['value'] ? 'selected' : '', $l_str_value == $l_arr_data['value'] ? 'selected' : '',
// phpcs:enable WordPress.PHP.StrictComparisons.LooseComparison
$l_str_caption $l_str_caption
); );
} }

View file

@ -1280,7 +1280,7 @@ class Footnotes_Task {
); );
// Prevent the footnotes from altering the excerpt: previously hard-coded '5ED84D6'. // Prevent the footnotes from altering the excerpt: previously hard-coded '5ED84D6'.
$l_int_placeholder = '@' . mt_rand( 100000000, 2147483647 ) . '@'; $l_int_placeholder = '@' . wp_rand( 100000000, 2147483647 ) . '@';
$p_str_content = preg_replace( $p_str_content = preg_replace(
'#' . self::$a_str_start_tag_regex . '.+?' . self::$a_str_end_tag_regex . '#', '#' . self::$a_str_start_tag_regex . '.+?' . self::$a_str_end_tag_regex . '#',
$l_int_placeholder, $l_int_placeholder,

View file

@ -92,7 +92,7 @@ class Footnotes_WYSIWYG {
$l_str_starting_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); $l_str_starting_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
$l_str_ending_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); $l_str_ending_tag = Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
} }
echo json_encode( echo wp_json_encode(
array( array(
'start' => htmlspecialchars( $l_str_starting_tag ), 'start' => htmlspecialchars( $l_str_starting_tag ),
'end' => htmlspecialchars( $l_str_ending_tag ), 'end' => htmlspecialchars( $l_str_ending_tag ),