>
@@ -32,11 +36,14 @@
'
',
\esc_attr( $post_input['lexical_form']['selector_id'] ),
\esc_attr( $post_input['lexical_form']['value'] ),
- \esc_attr( implode( ' ', [
- 'tsfem-e-focus-lexical-selector',
- 'tsfem-e-focus-enable-if-js',
- 'tsfem-e-focus-requires-javascript',
- ] ) ),
+ \esc_attr( implode(
+ ' ',
+ [
+ 'tsfem-e-focus-lexical-selector',
+ 'tsfem-e-focus-enable-if-js',
+ 'tsfem-e-focus-requires-javascript',
+ ]
+ ) ),
\TSF_Extension_Manager\HTML::make_sequential_dropdown_option_list(
$post_input['lexical_data']['value'],
$post_input['lexical_form']['value'] ?: ''
@@ -55,7 +62,7 @@
vprintf(
'
',
[
- $is_premium ? \esc_attr( $hidden_input['id'] ) : '',
+ \esc_attr( $is_premium ? $hidden_input['id'] : '' ),
\esc_attr( $hidden_input['id'] ),
\esc_attr( json_encode( $hidden_input['value'] ) ),
]
@@ -68,7 +75,7 @@
vprintf(
'
',
[
- $is_premium ? \esc_attr( $hidden_input['id'] ) : '',
+ \esc_attr( $is_premium ? $hidden_input['id'] : '' ),
\esc_attr( $hidden_input['id'] ),
\esc_attr( $hidden_input['value'] ),
]
@@ -85,12 +92,15 @@
printf(
'
%s',
- \esc_attr( implode( ' ', [
- 'tsfem-e-focus-edit-subject-button-wrap',
- 'tsfem-e-focus-edit-subject-button-wrap-disabled',
- 'tsfem-e-focus-requires-javascript',
- 'tsf-tooltip-wrap',
- ] ) ),
+ \esc_attr( implode(
+ ' ',
+ [
+ 'tsfem-e-focus-edit-subject-button-wrap',
+ 'tsfem-e-focus-edit-subject-button-wrap-disabled',
+ 'tsfem-e-focus-requires-javascript',
+ 'tsf-tooltip-wrap',
+ ]
+ ) ),
vsprintf(
'%s
',
[
@@ -99,12 +109,15 @@
\esc_attr( $action_ids['subject_edit'] )
),
\esc_attr( $action_ids['subject_edit'] ),
- \esc_attr( implode( ' ', [
- 'tsfem-e-focus-edit-subject',
- 'tsfem-e-inpost-icon',
- 'tsfem-e-inpost-icon-edit',
- 'tsf-tooltip-item',
- ] ) ),
+ \esc_attr( implode(
+ ' ',
+ [
+ 'tsfem-e-focus-edit-subject',
+ 'tsfem-e-inpost-icon',
+ 'tsfem-e-inpost-icon-edit',
+ 'tsf-tooltip-item',
+ ]
+ ) ),
\esc_attr__( 'Adjusting the subject requires JavaScript', 'the-seo-framework-extension-manager' ),
\esc_attr( $_tooltip ),
]
@@ -114,7 +127,7 @@
//= TEMP until highligher comes.
print '
';
}
- // TODO: upcoming version.
+ // phpcs:disable -- TODO: upcoming version.
// printf(
// '
%s',
// \esc_attr( implode( ' ', [
@@ -141,9 +154,10 @@
// ]
// )
// );
+ // phpcs:enable
printf(
'
',
- \esc_attr( $action_ids['collapser'] ), //* @see first checkbox
+ \esc_attr( $action_ids['collapser'] ), // @see first checkbox
\esc_attr__( 'View analysis', 'the-seo-framework-extension-manager' ),
'
'
);
diff --git a/extensions/essentials/focus/trunk/views/inpost/inpost.php b/extensions/essentials/focus/trunk/views/inpost/inpost.php
index f4ab1417..527ddbec 100644
--- a/extensions/essentials/focus/trunk/views/inpost/inpost.php
+++ b/extensions/essentials/focus/trunk/views/inpost/inpost.php
@@ -3,33 +3,49 @@
* @package TSF_Extension_Manager\Extension\Focus\Admin\Views
* @subpackage TSF_Extension_Manager\Inpost\Audit;
*/
+
namespace TSF_Extension_Manager\Extension\Focus;
+// phpcs:disable, VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- includes.
+// phpcs:disable, WordPress.WP.GlobalVariablesOverride -- This isn't the global scope.
+
/**
* @package TSF_Extension_Manager\Classes
*/
use \TSF_Extension_Manager\InpostGUI as InpostGUI;
use \TSF_Extension_Manager\InpostHTML as InpostHTML;
-defined( 'ABSPATH' ) and InpostGUI::verify( $_secret ) or die;
+\defined( 'TSF_EXTENSION_MANAGER_PRESENT' ) and InpostGUI::verify( $_secret ) or die;
$option_index = InpostGUI::get_option_key( $post_meta['kw']['option_index'], $post_meta['pm_index'] );
+
$make_option_id = function( $id, $key ) use ( $option_index ) {
return sprintf( '%s[%s][%s]', $option_index, $id, $key );
};
create_analysis_field :;
$focus_title = sprintf( '
%s
', $post_meta['kw']['label']['title'] );
- $focus_info = sprintf( '
%s
', \the_seo_framework()->make_info(
- $post_meta['kw']['label']['desc'],
- $post_meta['kw']['label']['link'],
- false
- ) );
+ $focus_info = sprintf(
+ '
%s
',
+ \the_seo_framework()->make_info(
+ $post_meta['kw']['label']['desc'],
+ $post_meta['kw']['label']['link'],
+ false
+ )
+ );
$focus_label = $focus_title . $focus_info;
//= Fix array if data is missing.
- $keyword_meta = array_slice( array_merge_recursive( $post_meta['kw']['values'], $defaults ), 0, 3 );
+ $keyword_meta = \array_slice(
+ array_merge_recursive(
+ $post_meta['kw']['values'],
+ $defaults
+ ),
+ 0,
+ 3
+ );
+ // phpcs:disable, Generic.WhiteSpace.ScopeIndent.IncorrectExact -- we're templating.
analysis_fields_output :;
InpostHTML::wrap_flex( 'block-open', '', 'tsfem-e-focus-analysis-wrap' );
InpostHTML::wrap_flex( 'label', $focus_label );
@@ -42,69 +58,70 @@
return isset( $values[ $id ] ) ? $values[ $id ] : '';
};
- call_user_func(
- $template_cb, [
- 'supportive' => (bool) $i++, // true if 2nd or later iteration.
- 'is_premium' => $is_premium,
+ \call_user_func(
+ $template_cb,
+ [
+ 'supportive' => (bool) $i++, // true if 2nd or later iteration.
+ 'is_premium' => $is_premium,
'language_supported' => $language_supported,
- 'has_keyword' => (bool) strlen( $values['keyword'] ),
- 'sub_scores' => [
+ 'has_keyword' => (bool) \strlen( $values['keyword'] ),
+ 'sub_scores' => [
'key' => $make_option_id( $id, 'scores' ),
'values' => $values['scores'],
],
- 'wrap_ids' => [
+ 'wrap_ids' => [
/* These shouldn't be saved. */
- 'collapse' => $make_option_id( $id, 'collapse' ),
- 'header' => $make_option_id( $id, 'header' ),
- 'content' => $make_option_id( $id, 'content' ),
- 'edit' => $make_option_id( $id, 'edit' ),
- 'evaluate' => $make_option_id( $id, 'evaluate' ),
+ 'collapse' => $make_option_id( $id, 'collapse' ),
+ 'header' => $make_option_id( $id, 'header' ),
+ 'content' => $make_option_id( $id, 'content' ),
+ 'edit' => $make_option_id( $id, 'edit' ),
+ 'evaluate' => $make_option_id( $id, 'evaluate' ),
'inflections' => $make_option_id( $id, 'inflections' ),
- 'synonyms' => $make_option_id( $id, 'synonyms' ),
+ 'synonyms' => $make_option_id( $id, 'synonyms' ),
],
- 'action_ids' => [
+ 'action_ids' => [
/* These shouldn't be saved. */
- 'collapser' => $make_option_id( $id, 'collapser' ),
- 'highlighter' => $make_option_id( $id, 'highlighter' ),
- 'subject_edit' => $make_option_id( $id, 'subject_edit' ),
+ 'collapser' => $make_option_id( $id, 'collapser' ),
+ 'highlighter' => $make_option_id( $id, 'highlighter' ),
+ 'subject_edit' => $make_option_id( $id, 'subject_edit' ),
'definition_selector' => $make_option_id( $id, 'definition_selector' ),
],
- 'post_input' => [
- 'keyword' => [
+ 'post_input' => [
+ 'keyword' => [
'id' => $make_option_id( $id, 'keyword' ),
'value' => $get_value( 'keyword' ),
],
- 'lexical_form' => [
- 'id' => $make_option_id( $id, 'lexical_form' ),
+ 'lexical_form' => [
+ 'id' => $make_option_id( $id, 'lexical_form' ),
'selector_id' => $make_option_id( $id, 'lexical_selector' ),
- 'value' => $get_value( 'lexical_form' ),
+ 'value' => $get_value( 'lexical_form' ),
],
- 'lexical_data' => [
+ 'lexical_data' => [
'id' => $make_option_id( $id, 'lexical_data' ),
'value' => $get_value( 'lexical_data' ) ?: [],
],
- 'active_inflections' => [
+ 'active_inflections' => [
'id' => $make_option_id( $id, 'active_inflections' ),
'value' => $get_value( 'active_inflections' ),
],
- 'active_synonyms' => [
+ 'active_synonyms' => [
'id' => $make_option_id( $id, 'active_synonyms' ),
'value' => $get_value( 'active_synonyms' ),
],
'definition_selection' => [
- 'id' => $make_option_id( $id, 'definition_selection' ),
+ 'id' => $make_option_id( $id, 'definition_selection' ),
'selector_id' => $make_option_id( $id, 'definition_dropdown' ),
- 'value' => $get_value( 'definition_selection' ),
+ 'value' => $get_value( 'definition_selection' ),
],
- 'inflection_data' => [
+ 'inflection_data' => [
'id' => $make_option_id( $id, 'inflection_data' ),
'value' => $get_value( 'inflection_data' ) ?: [],
],
- 'synonym_data' => [
+ 'synonym_data' => [
'id' => $make_option_id( $id, 'synonym_data' ),
'value' => $get_value( 'synonym_data' ) ?: [],
],
- 'score' => [
+ 'score' => [
'id' => $make_option_id( $id, 'score' ),
'value' => $get_value( 'score' ) ?: [],
],
@@ -114,3 +131,4 @@
endforeach;
InpostHTML::wrap_flex( 'content-close', '' );
InpostHTML::wrap_flex( 'block-close', '' );
+ // phpcs:enable, Generic.WhiteSpace.ScopeIndent.IncorrectExact
diff --git a/extensions/essentials/focus/trunk/views/inpost/js-templates.php b/extensions/essentials/focus/trunk/views/inpost/js-templates.php
index 75bf2fd3..79f8b495 100644
--- a/extensions/essentials/focus/trunk/views/inpost/js-templates.php
+++ b/extensions/essentials/focus/trunk/views/inpost/js-templates.php
@@ -3,18 +3,22 @@
* @package TSF_Extension_Manager\Extension\Focus\Views
* @subpackage TSF_Extension_Manager\Inpost\Audit\Templates;
*/
+
namespace TSF_Extension_Manager\Extension\Focus;
+// phpcs:disable, VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- includes.
+// phpcs:disable, WordPress.WP.GlobalVariablesOverride -- This isn't the global scope.
+
/**
* @package TSF_Extension_Manager\Classes
*/
use \TSF_Extension_Manager\InpostGUI as InpostGUI;
-defined( 'ABSPATH' ) and InpostGUI::verify( $_secret ) or die;
+\defined( 'TSF_EXTENSION_MANAGER_PRESENT' ) and InpostGUI::verify( $_secret ) or die;
?>