@@ -10,27 +10,27 @@ |
||
10 | 10 | |
11 | 11 | <?php |
12 | 12 | |
13 | - // Get the language locale part. |
|
14 | - $parts = explode( '_', get_locale() ); |
|
15 | - $language = isset( $parts[0] ) ? $parts[0] : ''; |
|
16 | - $country = isset( $parts[1] ) ? strtolower( $parts[1] ) : ''; |
|
17 | - ?> |
|
13 | + // Get the language locale part. |
|
14 | + $parts = explode( '_', get_locale() ); |
|
15 | + $language = isset( $parts[0] ) ? $parts[0] : ''; |
|
16 | + $country = isset( $parts[1] ) ? strtolower( $parts[1] ) : ''; |
|
17 | + ?> |
|
18 | 18 | |
19 | 19 | <br> |
20 | 20 | |
21 | 21 | <?php |
22 | - // Render country select element. |
|
22 | + // Render country select element. |
|
23 | 23 | // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
24 | - $country_select->render( |
|
25 | - array( |
|
26 | - 'id' => 'wl-country-code', |
|
27 | - 'name' => 'wl-country-code', |
|
28 | - 'lang' => $language, |
|
29 | - 'value' => $country, |
|
30 | - 'notice' => __( 'The selected language is not supported in this country.</br>Please choose another country or language.', 'wordlift' ), |
|
31 | - ) |
|
32 | - ); |
|
33 | - ?> |
|
24 | + $country_select->render( |
|
25 | + array( |
|
26 | + 'id' => 'wl-country-code', |
|
27 | + 'name' => 'wl-country-code', |
|
28 | + 'lang' => $language, |
|
29 | + 'value' => $country, |
|
30 | + 'notice' => __( 'The selected language is not supported in this country.</br>Please choose another country or language.', 'wordlift' ), |
|
31 | + ) |
|
32 | + ); |
|
33 | + ?> |
|
34 | 34 | |
35 | 35 | <div class="btn-wrapper"> |
36 | 36 | <input |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <!-- Pane 5 content --> |
2 | 2 | <script type="text/html" id="page-4"> |
3 | 3 | <h2 class="page-title"> |
4 | - <?php esc_html_e( 'Country', 'wordlift' ); ?> |
|
4 | + <?php esc_html_e('Country', 'wordlift'); ?> |
|
5 | 5 | </h2> |
6 | 6 | |
7 | 7 | <p class="page-txt"> |
8 | - <?php esc_html_e( 'Each WordLift key can be used only in one language.', 'wordlift' ); ?> |
|
8 | + <?php esc_html_e('Each WordLift key can be used only in one language.', 'wordlift'); ?> |
|
9 | 9 | </p> |
10 | 10 | |
11 | 11 | <?php |
12 | 12 | |
13 | 13 | // Get the language locale part. |
14 | - $parts = explode( '_', get_locale() ); |
|
15 | - $language = isset( $parts[0] ) ? $parts[0] : ''; |
|
16 | - $country = isset( $parts[1] ) ? strtolower( $parts[1] ) : ''; |
|
14 | + $parts = explode('_', get_locale()); |
|
15 | + $language = isset($parts[0]) ? $parts[0] : ''; |
|
16 | + $country = isset($parts[1]) ? strtolower($parts[1]) : ''; |
|
17 | 17 | ?> |
18 | 18 | |
19 | 19 | <br> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | 'name' => 'wl-country-code', |
28 | 28 | 'lang' => $language, |
29 | 29 | 'value' => $country, |
30 | - 'notice' => __( 'The selected language is not supported in this country.</br>Please choose another country or language.', 'wordlift' ), |
|
30 | + 'notice' => __('The selected language is not supported in this country.</br>Please choose another country or language.', 'wordlift'), |
|
31 | 31 | ) |
32 | 32 | ); |
33 | 33 | ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | type="button" |
38 | 38 | data-wl-next="wl-next" |
39 | 39 | class="wl-default-action" |
40 | - value="<?php esc_attr_e( 'Next', 'wordlift' ); ?>" |
|
40 | + value="<?php esc_attr_e('Next', 'wordlift'); ?>" |
|
41 | 41 | > |
42 | 42 | </div> |
43 | 43 | </script> |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <!-- Pane 4 content --> |
2 | 2 | <script type="text/html" id="page-3"> |
3 | 3 | <h2 class="page-title"> |
4 | - <?php esc_html_e( 'Vocabulary', 'wordlift' ); ?> |
|
4 | + <?php esc_html_e('Vocabulary', 'wordlift'); ?> |
|
5 | 5 | </h2> |
6 | 6 | |
7 | 7 | <p class="page-txt"> |
8 | - <?php esc_html_e( 'All new pages created with WordLift, will be stored inside your internal vocabulary. You can customize the url pattern of these pages in the field below. Check our FAQs if you need more info.', 'wordlift' ); ?> |
|
8 | + <?php esc_html_e('All new pages created with WordLift, will be stored inside your internal vocabulary. You can customize the url pattern of these pages in the field below. Check our FAQs if you need more info.', 'wordlift'); ?> |
|
9 | 9 | </p> |
10 | 10 | |
11 | 11 | <input |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | > |
20 | 20 | |
21 | 21 | <p class="page-det"> |
22 | - <?php esc_html_e( 'Leave it empty to place your entities in the root folder of your website', 'wordlift' ); ?> |
|
23 | - <?php esc_html_e( ' (requires the permalink settings to be set to Post name)', 'wordlift' ); ?> |
|
22 | + <?php esc_html_e('Leave it empty to place your entities in the root folder of your website', 'wordlift'); ?> |
|
23 | + <?php esc_html_e(' (requires the permalink settings to be set to Post name)', 'wordlift'); ?> |
|
24 | 24 | </p> |
25 | 25 | |
26 | 26 | <div class="btn-wrapper"> |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | type="button" |
29 | 29 | data-wl-next="wl-next" |
30 | 30 | class="wl-default-action" |
31 | - value="<?php esc_attr_e( 'Next', 'wordlift' ); ?>" |
|
31 | + value="<?php esc_attr_e('Next', 'wordlift'); ?>" |
|
32 | 32 | > |
33 | 33 | </div> |
34 | 34 | </script> |
@@ -6,8 +6,8 @@ |
||
6 | 6 | <br> |
7 | 7 | <p class="page-txt"> |
8 | 8 | <?php |
9 | - esc_html_e( 'Help us improve our product by automatically sending diagnostic and usage data.', 'wordlift' ); |
|
10 | - ?> |
|
9 | + esc_html_e( 'Help us improve our product by automatically sending diagnostic and usage data.', 'wordlift' ); |
|
10 | + ?> |
|
11 | 11 | </p> |
12 | 12 | <input |
13 | 13 | type="checkbox" |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <!-- Pane 2 content --> |
2 | 2 | <script type="text/html" id="page-1"> |
3 | 3 | <h2 class="page-title"> |
4 | - <?php esc_html_e( 'Diagnostic', 'wordlift' ); ?> |
|
4 | + <?php esc_html_e('Diagnostic', 'wordlift'); ?> |
|
5 | 5 | </h2> |
6 | 6 | <br> |
7 | 7 | <p class="page-txt"> |
8 | 8 | <?php |
9 | - esc_html_e( 'Help us improve our product by automatically sending diagnostic and usage data.', 'wordlift' ); |
|
9 | + esc_html_e('Help us improve our product by automatically sending diagnostic and usage data.', 'wordlift'); |
|
10 | 10 | ?> |
11 | 11 | </p> |
12 | 12 | <input |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | checked |
18 | 18 | > |
19 | 19 | <label for="share-diagnostic"> |
20 | - <?php esc_html_e( 'Share diagnostic data', 'wordlift' ); ?> |
|
20 | + <?php esc_html_e('Share diagnostic data', 'wordlift'); ?> |
|
21 | 21 | </label> |
22 | 22 | |
23 | 23 | <p class="privacy-policy-details"> |
24 | 24 | <a href="https://wordlift.io/privacy-policy/" target="_blank"> |
25 | - <?php esc_html_e( 'About our privacy policy...', 'wordlift' ); ?> |
|
25 | + <?php esc_html_e('About our privacy policy...', 'wordlift'); ?> |
|
26 | 26 | </a> |
27 | 27 | </p> |
28 | 28 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | type="button" |
32 | 32 | data-wl-next="wl-next" |
33 | 33 | class="wl-default-action" |
34 | - value="<?php esc_attr_e( 'Next', 'wordlift' ); ?>" |
|
34 | + value="<?php esc_attr_e('Next', 'wordlift'); ?>" |
|
35 | 35 | > |
36 | 36 | </div> |
37 | 37 | </script> |
@@ -39,16 +39,16 @@ |
||
39 | 39 | |
40 | 40 | <!-- Show the 'JSON-LD' button only if the constant is defined and set to true. --> |
41 | 41 | <?php |
42 | - if ( |
|
43 | - defined( 'WL_CONFIG_DOWNLOAD_GA_CONTENT_DATA' ) && |
|
44 | - WL_CONFIG_DOWNLOAD_GA_CONTENT_DATA |
|
45 | - ) : |
|
46 | - $class_name = 'button wl-add-input wl-button'; |
|
47 | - |
|
48 | - if ( ! Wordlift_Google_Analytics_Export_Service::is_postname_permalink_structure() ) { |
|
49 | - $class_name .= ' wl-button-disabled'; |
|
50 | - } |
|
51 | - ?> |
|
42 | + if ( |
|
43 | + defined( 'WL_CONFIG_DOWNLOAD_GA_CONTENT_DATA' ) && |
|
44 | + WL_CONFIG_DOWNLOAD_GA_CONTENT_DATA |
|
45 | + ) : |
|
46 | + $class_name = 'button wl-add-input wl-button'; |
|
47 | + |
|
48 | + if ( ! Wordlift_Google_Analytics_Export_Service::is_postname_permalink_structure() ) { |
|
49 | + $class_name .= ' wl-button-disabled'; |
|
50 | + } |
|
51 | + ?> |
|
52 | 52 | <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=wl_google_analytics_export' ) ); ?>" |
53 | 53 | class="<?php echo esc_attr( $class_name ); ?>"> |
54 | 54 | <?php esc_html_e( 'Google Analytics', 'wordlift' ); ?> |
@@ -14,46 +14,46 @@ |
||
14 | 14 | <!-- This file should primarily consist of HTML with a little bit of PHP. --> |
15 | 15 | |
16 | 16 | <div class="wrap"> |
17 | - <h2><?php echo esc_html_x( 'Download Your Data', 'Page title', 'wordlift' ); ?></h2> |
|
18 | - <p><?php esc_html_e( 'Choose the format to download your data:', 'wordlift' ); ?></p> |
|
17 | + <h2><?php echo esc_html_x('Download Your Data', 'Page title', 'wordlift'); ?></h2> |
|
18 | + <p><?php esc_html_e('Choose the format to download your data:', 'wordlift'); ?></p> |
|
19 | 19 | |
20 | - <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=wl_download_your_data&out=json' ) ); ?>" |
|
20 | + <a href="<?php echo esc_url(admin_url('admin-ajax.php?action=wl_download_your_data&out=json')); ?>" |
|
21 | 21 | class="button wl-add-input wl-button"> |
22 | - <?php esc_html_e( 'JSON-LD', 'wordlift' ); ?> |
|
22 | + <?php esc_html_e('JSON-LD', 'wordlift'); ?> |
|
23 | 23 | </a> |
24 | 24 | |
25 | - <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=wl_download_your_data&out=rdf' ) ); ?>" |
|
25 | + <a href="<?php echo esc_url(admin_url('admin-ajax.php?action=wl_download_your_data&out=rdf')); ?>" |
|
26 | 26 | class="button wl-add-input wl-button"> |
27 | - <?php esc_html_e( 'RDF/XML', 'wordlift' ); ?> |
|
27 | + <?php esc_html_e('RDF/XML', 'wordlift'); ?> |
|
28 | 28 | </a> |
29 | 29 | |
30 | - <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=wl_download_your_data&out=ttl' ) ); ?>" |
|
30 | + <a href="<?php echo esc_url(admin_url('admin-ajax.php?action=wl_download_your_data&out=ttl')); ?>" |
|
31 | 31 | class="button wl-add-input wl-button"> |
32 | - <?php echo esc_html_x( 'Turtle', 'File format, not the animal', 'wordlift' ); ?> |
|
32 | + <?php echo esc_html_x('Turtle', 'File format, not the animal', 'wordlift'); ?> |
|
33 | 33 | </a> |
34 | 34 | |
35 | - <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=wl_download_your_data&out=n3' ) ); ?>" |
|
35 | + <a href="<?php echo esc_url(admin_url('admin-ajax.php?action=wl_download_your_data&out=n3')); ?>" |
|
36 | 36 | class="button wl-add-input wl-button"> |
37 | - <?php esc_html_e( 'N3', 'wordlift' ); ?> |
|
37 | + <?php esc_html_e('N3', 'wordlift'); ?> |
|
38 | 38 | </a> |
39 | 39 | |
40 | 40 | <!-- Show the 'JSON-LD' button only if the constant is defined and set to true. --> |
41 | 41 | <?php |
42 | 42 | if ( |
43 | - defined( 'WL_CONFIG_DOWNLOAD_GA_CONTENT_DATA' ) && |
|
43 | + defined('WL_CONFIG_DOWNLOAD_GA_CONTENT_DATA') && |
|
44 | 44 | WL_CONFIG_DOWNLOAD_GA_CONTENT_DATA |
45 | 45 | ) : |
46 | 46 | $class_name = 'button wl-add-input wl-button'; |
47 | 47 | |
48 | - if ( ! Wordlift_Google_Analytics_Export_Service::is_postname_permalink_structure() ) { |
|
48 | + if ( ! Wordlift_Google_Analytics_Export_Service::is_postname_permalink_structure()) { |
|
49 | 49 | $class_name .= ' wl-button-disabled'; |
50 | 50 | } |
51 | 51 | ?> |
52 | - <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=wl_google_analytics_export' ) ); ?>" |
|
53 | - class="<?php echo esc_attr( $class_name ); ?>"> |
|
54 | - <?php esc_html_e( 'Google Analytics', 'wordlift' ); ?> |
|
52 | + <a href="<?php echo esc_url(admin_url('admin-ajax.php?action=wl_google_analytics_export')); ?>" |
|
53 | + class="<?php echo esc_attr($class_name); ?>"> |
|
54 | + <?php esc_html_e('Google Analytics', 'wordlift'); ?> |
|
55 | 55 | |
56 | - <?php if ( ! Wordlift_Google_Analytics_Export_Service::is_postname_permalink_structure() ) : ?> |
|
56 | + <?php if ( ! Wordlift_Google_Analytics_Export_Service::is_postname_permalink_structure()) : ?> |
|
57 | 57 | <span class="wl-tooltip">To download your data, please change <br /> the site permalink structure to "Post name"</span> |
58 | 58 | <?php endif ?> |
59 | 59 | </a> |
@@ -17,51 +17,51 @@ discard block |
||
17 | 17 | |
18 | 18 | <?php |
19 | 19 | |
20 | - $mappings = array_reduce( |
|
21 | - // The list of valid post types. |
|
22 | - Wordlift_Entity_Service::valid_entity_post_types(), |
|
23 | - function ( $carry, $post_type ) use ( $mapping_service ) { |
|
24 | - $entity_types = array_filter( |
|
25 | - Wordlift_Entity_Type_Adapter::get_entity_types( $post_type ), |
|
26 | - function ( $item ) { |
|
27 | - return 'http://schema.org/Article' !== $item; |
|
28 | - } |
|
29 | - ); |
|
30 | - |
|
31 | - if ( empty( $entity_types ) ) { |
|
32 | - return $carry; |
|
33 | - } |
|
34 | - |
|
35 | - return $carry + array( |
|
36 | - $post_type => array( |
|
37 | - 'entity_types' => $entity_types, |
|
38 | - 'count' => $mapping_service->count( $post_type, $entity_types ), |
|
39 | - ), |
|
40 | - ); |
|
41 | - }, |
|
42 | - array() |
|
43 | - ); |
|
44 | - |
|
45 | - $mappings['_nonce'] = wp_create_nonce( 'update_post_type_entity_types' ); |
|
46 | - |
|
47 | - $json = wp_json_encode( $mappings ); |
|
48 | - echo wp_kses( "<script type='application/javascript'>var wlMappings = $json;</script>", array( 'script' => array( 'type' => array() ) ) ); |
|
49 | - |
|
50 | - ?> |
|
20 | + $mappings = array_reduce( |
|
21 | + // The list of valid post types. |
|
22 | + Wordlift_Entity_Service::valid_entity_post_types(), |
|
23 | + function ( $carry, $post_type ) use ( $mapping_service ) { |
|
24 | + $entity_types = array_filter( |
|
25 | + Wordlift_Entity_Type_Adapter::get_entity_types( $post_type ), |
|
26 | + function ( $item ) { |
|
27 | + return 'http://schema.org/Article' !== $item; |
|
28 | + } |
|
29 | + ); |
|
30 | + |
|
31 | + if ( empty( $entity_types ) ) { |
|
32 | + return $carry; |
|
33 | + } |
|
34 | + |
|
35 | + return $carry + array( |
|
36 | + $post_type => array( |
|
37 | + 'entity_types' => $entity_types, |
|
38 | + 'count' => $mapping_service->count( $post_type, $entity_types ), |
|
39 | + ), |
|
40 | + ); |
|
41 | + }, |
|
42 | + array() |
|
43 | + ); |
|
44 | + |
|
45 | + $mappings['_nonce'] = wp_create_nonce( 'update_post_type_entity_types' ); |
|
46 | + |
|
47 | + $json = wp_json_encode( $mappings ); |
|
48 | + echo wp_kses( "<script type='application/javascript'>var wlMappings = $json;</script>", array( 'script' => array( 'type' => array() ) ) ); |
|
49 | + |
|
50 | + ?> |
|
51 | 51 | |
52 | 52 | <?php |
53 | 53 | |
54 | - foreach ( $mappings as $key => $value ) { |
|
55 | - // Continue if this is the nonce. |
|
56 | - if ( '_nonce' === $key ) { |
|
57 | - continue; |
|
58 | - } |
|
59 | - |
|
60 | - // Continue if the count isn't set or it's zero, i.e. no need to apply the taxonomy. |
|
61 | - if ( ! isset( $value['count'] ) || 0 === $value['count'] ) { |
|
62 | - continue; |
|
63 | - } |
|
64 | - ?> |
|
54 | + foreach ( $mappings as $key => $value ) { |
|
55 | + // Continue if this is the nonce. |
|
56 | + if ( '_nonce' === $key ) { |
|
57 | + continue; |
|
58 | + } |
|
59 | + |
|
60 | + // Continue if the count isn't set or it's zero, i.e. no need to apply the taxonomy. |
|
61 | + if ( ! isset( $value['count'] ) || 0 === $value['count'] ) { |
|
62 | + continue; |
|
63 | + } |
|
64 | + ?> |
|
65 | 65 | <div class="post-type-to-entity-types"> |
66 | 66 | <button data-post-type="<?php echo esc_attr( $key ); ?>" |
67 | 67 | data-entity-types="<?php echo esc_attr( wp_json_encode( $value['entity_types'] ) ); ?>" |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | <div><?php echo esc_html( $value['count'] ); ?></div> |
70 | 70 | </div> |
71 | 71 | <?php |
72 | - } |
|
72 | + } |
|
73 | 73 | |
74 | - ?> |
|
74 | + ?> |
|
75 | 75 | |
76 | 76 | <div id="schemaorg-sync"> |
77 | 77 | <button>Sync Schema.org classes</button> |
@@ -6,13 +6,13 @@ discard block |
||
6 | 6 | * @package Wordlift |
7 | 7 | * @subpackage Wordlift/admin/partials |
8 | 8 | */ |
9 | -wp_enqueue_script( 'wp-util' ); |
|
9 | +wp_enqueue_script('wp-util'); |
|
10 | 10 | |
11 | 11 | $mapping_service = Wordlift_Mapping_Service::get_instance(); |
12 | 12 | ?> |
13 | 13 | <div id="wpbody-content" aria-label="Main content" tabindex="0"> |
14 | 14 | <div class="wrap"> |
15 | - <h1><?php echo esc_html__( 'Mappings', 'wordlift' ); ?></h1> |
|
15 | + <h1><?php echo esc_html__('Mappings', 'wordlift'); ?></h1> |
|
16 | 16 | </div> |
17 | 17 | |
18 | 18 | <?php |
@@ -20,53 +20,53 @@ discard block |
||
20 | 20 | $mappings = array_reduce( |
21 | 21 | // The list of valid post types. |
22 | 22 | Wordlift_Entity_Service::valid_entity_post_types(), |
23 | - function ( $carry, $post_type ) use ( $mapping_service ) { |
|
23 | + function($carry, $post_type) use ($mapping_service) { |
|
24 | 24 | $entity_types = array_filter( |
25 | - Wordlift_Entity_Type_Adapter::get_entity_types( $post_type ), |
|
26 | - function ( $item ) { |
|
25 | + Wordlift_Entity_Type_Adapter::get_entity_types($post_type), |
|
26 | + function($item) { |
|
27 | 27 | return 'http://schema.org/Article' !== $item; |
28 | 28 | } |
29 | 29 | ); |
30 | 30 | |
31 | - if ( empty( $entity_types ) ) { |
|
31 | + if (empty($entity_types)) { |
|
32 | 32 | return $carry; |
33 | 33 | } |
34 | 34 | |
35 | 35 | return $carry + array( |
36 | 36 | $post_type => array( |
37 | 37 | 'entity_types' => $entity_types, |
38 | - 'count' => $mapping_service->count( $post_type, $entity_types ), |
|
38 | + 'count' => $mapping_service->count($post_type, $entity_types), |
|
39 | 39 | ), |
40 | 40 | ); |
41 | 41 | }, |
42 | 42 | array() |
43 | 43 | ); |
44 | 44 | |
45 | - $mappings['_nonce'] = wp_create_nonce( 'update_post_type_entity_types' ); |
|
45 | + $mappings['_nonce'] = wp_create_nonce('update_post_type_entity_types'); |
|
46 | 46 | |
47 | - $json = wp_json_encode( $mappings ); |
|
48 | - echo wp_kses( "<script type='application/javascript'>var wlMappings = $json;</script>", array( 'script' => array( 'type' => array() ) ) ); |
|
47 | + $json = wp_json_encode($mappings); |
|
48 | + echo wp_kses("<script type='application/javascript'>var wlMappings = $json;</script>", array('script' => array('type' => array()))); |
|
49 | 49 | |
50 | 50 | ?> |
51 | 51 | |
52 | 52 | <?php |
53 | 53 | |
54 | - foreach ( $mappings as $key => $value ) { |
|
54 | + foreach ($mappings as $key => $value) { |
|
55 | 55 | // Continue if this is the nonce. |
56 | - if ( '_nonce' === $key ) { |
|
56 | + if ('_nonce' === $key) { |
|
57 | 57 | continue; |
58 | 58 | } |
59 | 59 | |
60 | 60 | // Continue if the count isn't set or it's zero, i.e. no need to apply the taxonomy. |
61 | - if ( ! isset( $value['count'] ) || 0 === $value['count'] ) { |
|
61 | + if ( ! isset($value['count']) || 0 === $value['count']) { |
|
62 | 62 | continue; |
63 | 63 | } |
64 | 64 | ?> |
65 | 65 | <div class="post-type-to-entity-types"> |
66 | - <button data-post-type="<?php echo esc_attr( $key ); ?>" |
|
67 | - data-entity-types="<?php echo esc_attr( wp_json_encode( $value['entity_types'] ) ); ?>" |
|
68 | - ><?php echo esc_html( $key ); ?></button> |
|
69 | - <div><?php echo esc_html( $value['count'] ); ?></div> |
|
66 | + <button data-post-type="<?php echo esc_attr($key); ?>" |
|
67 | + data-entity-types="<?php echo esc_attr(wp_json_encode($value['entity_types'])); ?>" |
|
68 | + ><?php echo esc_html($key); ?></button> |
|
69 | + <div><?php echo esc_html($value['count']); ?></div> |
|
70 | 70 | </div> |
71 | 71 | <?php |
72 | 72 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | <div id="schemaorg-sync"> |
77 | 77 | <button>Sync Schema.org classes</button> |
78 | - <div class="count"><?php echo esc_html( Wordlift_Schemaorg_Sync_Batch_Operation::get_instance()->count() ); ?></div> |
|
78 | + <div class="count"><?php echo esc_html(Wordlift_Schemaorg_Sync_Batch_Operation::get_instance()->count()); ?></div> |
|
79 | 79 | </div> |
80 | 80 | |
81 | 81 | <div class="clear"></div> |
@@ -3,15 +3,15 @@ |
||
3 | 3 | use Wordlift\Scripts\Scripts_Helper; |
4 | 4 | |
5 | 5 | Scripts_Helper::enqueue_based_on_wordpress_version( |
6 | - 'wl-vocabulary-match-terms-settings', |
|
7 | - plugin_dir_url( dirname( __DIR__ ) ) . 'js/dist/vocabulary-settings-page', |
|
8 | - array( 'react', 'react-dom', 'wp-polyfill' ) |
|
6 | + 'wl-vocabulary-match-terms-settings', |
|
7 | + plugin_dir_url( dirname( __DIR__ ) ) . 'js/dist/vocabulary-settings-page', |
|
8 | + array( 'react', 'react-dom', 'wp-polyfill' ) |
|
9 | 9 | ); |
10 | 10 | |
11 | 11 | wp_enqueue_style( |
12 | - 'wl-vocabulary-match-terms-settings', |
|
13 | - plugin_dir_url( dirname( __DIR__ ) ) . 'js/dist/vocabulary-settings-page.full.css', |
|
14 | - array(), |
|
15 | - WORDLIFT_VERSION |
|
12 | + 'wl-vocabulary-match-terms-settings', |
|
13 | + plugin_dir_url( dirname( __DIR__ ) ) . 'js/dist/vocabulary-settings-page.full.css', |
|
14 | + array(), |
|
15 | + WORDLIFT_VERSION |
|
16 | 16 | ); |
17 | 17 | echo "<br/><div id='wl_vocabulary_analysis_progress_bar'></div>"; |
@@ -4,13 +4,13 @@ |
||
4 | 4 | |
5 | 5 | Scripts_Helper::enqueue_based_on_wordpress_version( |
6 | 6 | 'wl-vocabulary-match-terms-settings', |
7 | - plugin_dir_url( dirname( __DIR__ ) ) . 'js/dist/vocabulary-settings-page', |
|
8 | - array( 'react', 'react-dom', 'wp-polyfill' ) |
|
7 | + plugin_dir_url(dirname(__DIR__)).'js/dist/vocabulary-settings-page', |
|
8 | + array('react', 'react-dom', 'wp-polyfill') |
|
9 | 9 | ); |
10 | 10 | |
11 | 11 | wp_enqueue_style( |
12 | 12 | 'wl-vocabulary-match-terms-settings', |
13 | - plugin_dir_url( dirname( __DIR__ ) ) . 'js/dist/vocabulary-settings-page.full.css', |
|
13 | + plugin_dir_url(dirname(__DIR__)).'js/dist/vocabulary-settings-page.full.css', |
|
14 | 14 | array(), |
15 | 15 | WORDLIFT_VERSION |
16 | 16 | ); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
10 | - exit; |
|
10 | + exit; |
|
11 | 11 | } |
12 | 12 | ?> |
13 | 13 | |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | |
16 | 16 | <form action="options.php" method="post"> |
17 | 17 | <?php |
18 | - settings_fields( 'wl_general_settings' ); |
|
19 | - do_settings_sections( 'wl_general_settings' ); |
|
20 | - submit_button(); |
|
21 | - ?> |
|
18 | + settings_fields( 'wl_general_settings' ); |
|
19 | + do_settings_sections( 'wl_general_settings' ); |
|
20 | + submit_button(); |
|
21 | + ?> |
|
22 | 22 | </form> |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @package Wordlift/admin |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } |
12 | 12 | ?> |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | |
16 | 16 | <form action="options.php" method="post"> |
17 | 17 | <?php |
18 | - settings_fields( 'wl_general_settings' ); |
|
19 | - do_settings_sections( 'wl_general_settings' ); |
|
18 | + settings_fields('wl_general_settings'); |
|
19 | + do_settings_sections('wl_general_settings'); |
|
20 | 20 | submit_button(); |
21 | 21 | ?> |
22 | 22 | </form> |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
224 | 224 | $top_entities = $this->get_top_entities(); |
225 | 225 | if ( ! empty( $top_entities ) ) { |
226 | - ?> |
|
226 | + ?> |
|
227 | 227 | <div class="wl-dashboard__block wl-dashboard__block--top-entities"> |
228 | 228 | <header> |
229 | 229 | <span class="dashicons dashicons-editor-help"></span> |
@@ -233,26 +233,26 @@ discard block |
||
233 | 233 | </header> |
234 | 234 | <div class="wl-dashboard__block__body"> |
235 | 235 | <?php |
236 | - $max = $top_entities[0]->total; |
|
237 | - $unit = intval( '1' . str_repeat( '0', strlen( $max ) - 1 ) ); |
|
238 | - $max_value = ceil( (float) $max / $unit ) * $unit; |
|
239 | - $chunk_value = $max_value / 4; |
|
240 | - ?> |
|
236 | + $max = $top_entities[0]->total; |
|
237 | + $unit = intval( '1' . str_repeat( '0', strlen( $max ) - 1 ) ); |
|
238 | + $max_value = ceil( (float) $max / $unit ) * $unit; |
|
239 | + $chunk_value = $max_value / 4; |
|
240 | + ?> |
|
241 | 241 | <div></div> |
242 | 242 | <div class="wl-dashboard__block__body__table-header"> |
243 | 243 | <?php for ( $i = 0; $i <= $max_value; $i += $chunk_value ) { ?> |
244 | 244 | <span><?php echo esc_html( $i ); ?></span><?php } ?> |
245 | 245 | </div> |
246 | 246 | <?php |
247 | - $i = 0; |
|
248 | - // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
|
249 | - foreach ( $this->get_top_entities() as $top_entity ) { |
|
250 | - $permalink = get_permalink( $top_entity->ID ); |
|
251 | - $post_title = $top_entity->post_title; |
|
252 | - $entities_100 = 100 * $top_entity->entities / $max_value; |
|
253 | - $posts_100 = 100 * $top_entity->posts / $max_value; |
|
254 | - |
|
255 | - ?> |
|
247 | + $i = 0; |
|
248 | + // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
|
249 | + foreach ( $this->get_top_entities() as $top_entity ) { |
|
250 | + $permalink = get_permalink( $top_entity->ID ); |
|
251 | + $post_title = $top_entity->post_title; |
|
252 | + $entities_100 = 100 * $top_entity->entities / $max_value; |
|
253 | + $posts_100 = 100 * $top_entity->posts / $max_value; |
|
254 | + |
|
255 | + ?> |
|
256 | 256 | <div><a href="<?php echo esc_attr( $permalink ); ?>"><?php echo esc_html( $post_title ); ?></a></div> |
257 | 257 | <div> |
258 | 258 | <div class="wl-dashboard__bar wl-dashboard__bar--posts" |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | </div> |
264 | 264 | </div> |
265 | 265 | <?php |
266 | - if ( 4 === $i ++ ) { |
|
267 | - ?> |
|
266 | + if ( 4 === $i ++ ) { |
|
267 | + ?> |
|
268 | 268 | <input id="wl-dashboard__show-more" type="checkbox"> |
269 | 269 | <label for="wl-dashboard__show-more"> |
270 | 270 | <span> |
@@ -275,9 +275,9 @@ discard block |
||
275 | 275 | </span> |
276 | 276 | </label> |
277 | 277 | <?php |
278 | - } |
|
279 | - } |
|
280 | - ?> |
|
278 | + } |
|
279 | + } |
|
280 | + ?> |
|
281 | 281 | </div> |
282 | 282 | </div> |
283 | 283 | <?php |
@@ -307,9 +307,9 @@ discard block |
||
307 | 307 | <div class="wl-dashboard__block__body"> |
308 | 308 | <a href="<?php echo esc_url( $vocabulary_url ); ?>"> |
309 | 309 | <?php |
310 | - // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
|
311 | - echo esc_html( $this->entity_service->count() ); |
|
312 | - ?> |
|
310 | + // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
|
311 | + echo esc_html( $this->entity_service->count() ); |
|
312 | + ?> |
|
313 | 313 | </a> |
314 | 314 | <a href="<?php echo esc_url( $vocabulary_url ); ?>"><?php echo esc_html( _x( 'Vocabulary', 'Dashboard', 'wordlift' ) ); ?></a> |
315 | 315 | </div> |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | white-space: nowrap; |
120 | 120 | } |
121 | 121 | |
122 | - <?php $blu_dot_url = plugin_dir_url( dirname( __DIR__ ) ) . 'images/blu-dot.gif'; ?> |
|
122 | + <?php $blu_dot_url = plugin_dir_url(dirname(__DIR__)).'images/blu-dot.gif'; ?> |
|
123 | 123 | #wl-dashboard-v2 .wl-dashboard__block--top-entities .wl-dashboard__block__body > div:nth-child(even) { |
124 | 124 | flex: calc(100% - 120px); |
125 | 125 | background-color: #ebf6ff; |
126 | - background-image: url('<?php echo esc_url( $blu_dot_url ); ?>'), url('<?php echo esc_url( $blu_dot_url ); ?>'), url('<?php echo esc_url( $blu_dot_url ); ?>'); |
|
126 | + background-image: url('<?php echo esc_url($blu_dot_url); ?>'), url('<?php echo esc_url($blu_dot_url); ?>'), url('<?php echo esc_url($blu_dot_url); ?>'); |
|
127 | 127 | background-position: 25% center, 50%, 75%; |
128 | 128 | background-size: 1px 4px; |
129 | 129 | background-repeat: repeat-y; |
@@ -222,56 +222,56 @@ discard block |
||
222 | 222 | |
223 | 223 | // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
224 | 224 | $top_entities = $this->get_top_entities(); |
225 | -if ( ! empty( $top_entities ) ) { |
|
225 | +if ( ! empty($top_entities)) { |
|
226 | 226 | ?> |
227 | 227 | <div class="wl-dashboard__block wl-dashboard__block--top-entities"> |
228 | 228 | <header> |
229 | 229 | <span class="dashicons dashicons-editor-help"></span> |
230 | - <h3><?php esc_html_e( 'Top entities', 'wordlift' ); ?></h3> |
|
231 | - <span class="wl-dashboard__legend wl-dashboard__legend--entities"><?php echo esc_html( _x( 'Links with entities', 'Dashboard', 'wordlift' ) ); ?></span> |
|
232 | - <span class="wl-dashboard__legend wl-dashboard__legend--posts"><?php echo esc_html( _x( 'Post with entities', 'Dashboard', 'wordlift' ) ); ?></span> |
|
230 | + <h3><?php esc_html_e('Top entities', 'wordlift'); ?></h3> |
|
231 | + <span class="wl-dashboard__legend wl-dashboard__legend--entities"><?php echo esc_html(_x('Links with entities', 'Dashboard', 'wordlift')); ?></span> |
|
232 | + <span class="wl-dashboard__legend wl-dashboard__legend--posts"><?php echo esc_html(_x('Post with entities', 'Dashboard', 'wordlift')); ?></span> |
|
233 | 233 | </header> |
234 | 234 | <div class="wl-dashboard__block__body"> |
235 | 235 | <?php |
236 | 236 | $max = $top_entities[0]->total; |
237 | - $unit = intval( '1' . str_repeat( '0', strlen( $max ) - 1 ) ); |
|
238 | - $max_value = ceil( (float) $max / $unit ) * $unit; |
|
237 | + $unit = intval('1'.str_repeat('0', strlen($max) - 1)); |
|
238 | + $max_value = ceil((float) $max / $unit) * $unit; |
|
239 | 239 | $chunk_value = $max_value / 4; |
240 | 240 | ?> |
241 | 241 | <div></div> |
242 | 242 | <div class="wl-dashboard__block__body__table-header"> |
243 | - <?php for ( $i = 0; $i <= $max_value; $i += $chunk_value ) { ?> |
|
244 | - <span><?php echo esc_html( $i ); ?></span><?php } ?> |
|
243 | + <?php for ($i = 0; $i <= $max_value; $i += $chunk_value) { ?> |
|
244 | + <span><?php echo esc_html($i); ?></span><?php } ?> |
|
245 | 245 | </div> |
246 | 246 | <?php |
247 | 247 | $i = 0; |
248 | 248 | // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
249 | - foreach ( $this->get_top_entities() as $top_entity ) { |
|
250 | - $permalink = get_permalink( $top_entity->ID ); |
|
249 | + foreach ($this->get_top_entities() as $top_entity) { |
|
250 | + $permalink = get_permalink($top_entity->ID); |
|
251 | 251 | $post_title = $top_entity->post_title; |
252 | 252 | $entities_100 = 100 * $top_entity->entities / $max_value; |
253 | 253 | $posts_100 = 100 * $top_entity->posts / $max_value; |
254 | 254 | |
255 | 255 | ?> |
256 | - <div><a href="<?php echo esc_attr( $permalink ); ?>"><?php echo esc_html( $post_title ); ?></a></div> |
|
256 | + <div><a href="<?php echo esc_attr($permalink); ?>"><?php echo esc_html($post_title); ?></a></div> |
|
257 | 257 | <div> |
258 | 258 | <div class="wl-dashboard__bar wl-dashboard__bar--posts" |
259 | - style="width: <?php echo esc_attr( $posts_100 ); ?>%;"> |
|
259 | + style="width: <?php echo esc_attr($posts_100); ?>%;"> |
|
260 | 260 | </div> |
261 | 261 | <div class="wl-dashboard__bar wl-dashboard__bar--entities" |
262 | - style="width: <?php echo esc_attr( $entities_100 ); ?>%;"> |
|
262 | + style="width: <?php echo esc_attr($entities_100); ?>%;"> |
|
263 | 263 | </div> |
264 | 264 | </div> |
265 | 265 | <?php |
266 | - if ( 4 === $i ++ ) { |
|
266 | + if (4 === $i++) { |
|
267 | 267 | ?> |
268 | 268 | <input id="wl-dashboard__show-more" type="checkbox"> |
269 | 269 | <label for="wl-dashboard__show-more"> |
270 | 270 | <span> |
271 | - <?php echo esc_html( __( 'Show more', 'wordlift' ) ); ?> |
|
271 | + <?php echo esc_html(__('Show more', 'wordlift')); ?> |
|
272 | 272 | </span> |
273 | 273 | <span> |
274 | - <?php echo esc_html( __( 'Hide', 'wordlift' ) ); ?> |
|
274 | + <?php echo esc_html(__('Hide', 'wordlift')); ?> |
|
275 | 275 | </span> |
276 | 276 | </label> |
277 | 277 | <?php |
@@ -283,46 +283,46 @@ discard block |
||
283 | 283 | <?php |
284 | 284 | } |
285 | 285 | |
286 | -$not_enriched_url = admin_url( 'edit.php?post_type=post&wl_enriched=no' ); |
|
286 | +$not_enriched_url = admin_url('edit.php?post_type=post&wl_enriched=no'); |
|
287 | 287 | $dashboard_service = Wordlift_Dashboard_Service::get_instance(); |
288 | 288 | ?> |
289 | 289 | <div class="wl-dashboard__block wl-dashboard__block--enriched-posts"> |
290 | 290 | <header> |
291 | 291 | <span class="dashicons dashicons-editor-help"></span> |
292 | - <h3><?php echo esc_html__( 'Enriched posts', 'wordlift' ); ?></h3> |
|
292 | + <h3><?php echo esc_html__('Enriched posts', 'wordlift'); ?></h3> |
|
293 | 293 | </header> |
294 | 294 | <div class="wl-dashboard__block__body"> |
295 | - <a href="<?php echo esc_url( $not_enriched_url ); ?>"><?php echo esc_html( $dashboard_service->count_annotated_posts() ); ?></a> |
|
296 | - / <?php echo esc_html( $dashboard_service->count_posts() ); ?> |
|
297 | - <a href="<?php echo esc_url( $not_enriched_url ); ?>"><?php echo esc_html( _x( 'Enrich', 'Dashboard', 'wordlift' ) ); ?></a> |
|
295 | + <a href="<?php echo esc_url($not_enriched_url); ?>"><?php echo esc_html($dashboard_service->count_annotated_posts()); ?></a> |
|
296 | + / <?php echo esc_html($dashboard_service->count_posts()); ?> |
|
297 | + <a href="<?php echo esc_url($not_enriched_url); ?>"><?php echo esc_html(_x('Enrich', 'Dashboard', 'wordlift')); ?></a> |
|
298 | 298 | </div> |
299 | 299 | </div> |
300 | 300 | |
301 | -<?php $vocabulary_url = admin_url( 'edit.php?post_type=entity' ); ?> |
|
301 | +<?php $vocabulary_url = admin_url('edit.php?post_type=entity'); ?> |
|
302 | 302 | <div class="wl-dashboard__block wl-dashboard__block--created-entities"> |
303 | 303 | <header> |
304 | 304 | <span class="dashicons dashicons-editor-help"></span> |
305 | - <h3><?php esc_html_e( 'Created entities', 'wordlift' ); ?></h3> |
|
305 | + <h3><?php esc_html_e('Created entities', 'wordlift'); ?></h3> |
|
306 | 306 | </header> |
307 | 307 | <div class="wl-dashboard__block__body"> |
308 | - <a href="<?php echo esc_url( $vocabulary_url ); ?>"> |
|
308 | + <a href="<?php echo esc_url($vocabulary_url); ?>"> |
|
309 | 309 | <?php |
310 | 310 | // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
311 | - echo esc_html( $this->entity_service->count() ); |
|
311 | + echo esc_html($this->entity_service->count()); |
|
312 | 312 | ?> |
313 | 313 | </a> |
314 | - <a href="<?php echo esc_url( $vocabulary_url ); ?>"><?php echo esc_html( _x( 'Vocabulary', 'Dashboard', 'wordlift' ) ); ?></a> |
|
314 | + <a href="<?php echo esc_url($vocabulary_url); ?>"><?php echo esc_html(_x('Vocabulary', 'Dashboard', 'wordlift')); ?></a> |
|
315 | 315 | </div> |
316 | 316 | </div> |
317 | 317 | |
318 | 318 | <div class="wl-dashboard__block wl-dashboard__block--average-entity-rating"> |
319 | 319 | <header> |
320 | 320 | <span class="dashicons dashicons-editor-help"></span> |
321 | - <h3><?php echo esc_html__( 'Average entity rating', 'wordlift' ); ?></h3> |
|
321 | + <h3><?php echo esc_html__('Average entity rating', 'wordlift'); ?></h3> |
|
322 | 322 | </header> |
323 | 323 | <div class="wl-dashboard__block__body"> |
324 | - <?php echo esc_html( $dashboard_service->average_entities_rating() ); ?> |
|
325 | - <?php echo esc_html( _x( 'Boost', 'Dashboard', 'wordlift' ) ); ?> |
|
324 | + <?php echo esc_html($dashboard_service->average_entities_rating()); ?> |
|
325 | + <?php echo esc_html(_x('Boost', 'Dashboard', 'wordlift')); ?> |
|
326 | 326 | </div> |
327 | 327 | </div> |
328 | 328 | <?php |
@@ -333,4 +333,4 @@ discard block |
||
333 | 333 | * @author Naveen Muthusamy <[email protected]> |
334 | 334 | * Action name : wl_admin_dashboard_widgets |
335 | 335 | */ |
336 | -do_action( 'wl_admin_dashboard_widgets' ); |
|
336 | +do_action('wl_admin_dashboard_widgets'); |
@@ -11,10 +11,10 @@ discard block |
||
11 | 11 | <?php settings_errors(); ?> |
12 | 12 | <form action="options.php" method="post"> |
13 | 13 | <?php |
14 | - settings_fields( 'wl_analytics_settings' ); |
|
15 | - do_settings_sections( 'wl_analytics_settings' ); |
|
16 | - submit_button(); |
|
17 | - ?> |
|
14 | + settings_fields( 'wl_analytics_settings' ); |
|
15 | + do_settings_sections( 'wl_analytics_settings' ); |
|
16 | + submit_button(); |
|
17 | + ?> |
|
18 | 18 | </form> |
19 | 19 | <div class="info"> |
20 | 20 | <b><?php esc_html_e( 'For Google Tag Manager there is additional setup steps needed in the GTM interface. These are the general instructions:', 'wordlift' ); ?></b> |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | <li><?php esc_html_e( 'You should already have a configuration variable setup to pass data along to your provider. This is assumed to be Google Analytics and a google analytics configuration object. If you don\'t have this setup then set it up now.', 'wordlift' ); ?></li> |
23 | 23 | <li> |
24 | 24 | <?php |
25 | - printf( |
|
26 | - /* translators: 1: Variables, 2: Data Layer Variable. */ |
|
27 | - esc_html__( 'Visit the GTM dashboard and head to the %1$s menu. Add a new user-defined variable of type %2$s for each of the following items:', 'wordlift' ), |
|
28 | - '<b>Variables</b>', |
|
29 | - '<i>Data Layer Variable</i>' |
|
30 | - ); |
|
31 | - ?> |
|
25 | + printf( |
|
26 | + /* translators: 1: Variables, 2: Data Layer Variable. */ |
|
27 | + esc_html__( 'Visit the GTM dashboard and head to the %1$s menu. Add a new user-defined variable of type %2$s for each of the following items:', 'wordlift' ), |
|
28 | + '<b>Variables</b>', |
|
29 | + '<i>Data Layer Variable</i>' |
|
30 | + ); |
|
31 | + ?> |
|
32 | 32 | <ol> |
33 | 33 | <li><i>event</i></li> |
34 | 34 | <li><i>wl_event_action</i></li> |
@@ -44,56 +44,56 @@ discard block |
||
44 | 44 | </li> |
45 | 45 | <li> |
46 | 46 | <?php |
47 | - printf( |
|
48 | - /* translators: 1: Google Analytics Settings. */ |
|
49 | - esc_html__( 'Create another variable to pass along the 2 custom dimensions with the type %1$s. For each of the 2 items set the following:', 'wordlift' ), |
|
50 | - '<i>Google Analytics Settings</i>' |
|
51 | - ); |
|
52 | - ?> |
|
47 | + printf( |
|
48 | + /* translators: 1: Google Analytics Settings. */ |
|
49 | + esc_html__( 'Create another variable to pass along the 2 custom dimensions with the type %1$s. For each of the 2 items set the following:', 'wordlift' ), |
|
50 | + '<i>Google Analytics Settings</i>' |
|
51 | + ); |
|
52 | + ?> |
|
53 | 53 | <ol> |
54 | 54 | <li><?php esc_html_e( 'Set the index to the index of the custom event you want to push this into at Google Analytics, this will usually be a number between 1 and 9.', 'wordlift' ); ?></li> |
55 | 55 | <li> |
56 | 56 | <?php |
57 | - printf( |
|
58 | - /* translators: 1: wl_index_uri, 2: wl_index_type. */ |
|
59 | - esc_html__( 'Set the values of each one to the %1$s and the %2$s respectively.', 'wordlift' ), |
|
60 | - '<i>wl_index_uri</i> - <i>wl_event_uri</i>', |
|
61 | - '<i>wl_index_type</i> - <i>wl_event_type</i>' |
|
62 | - ); |
|
63 | - ?> |
|
57 | + printf( |
|
58 | + /* translators: 1: wl_index_uri, 2: wl_index_type. */ |
|
59 | + esc_html__( 'Set the values of each one to the %1$s and the %2$s respectively.', 'wordlift' ), |
|
60 | + '<i>wl_index_uri</i> - <i>wl_event_uri</i>', |
|
61 | + '<i>wl_index_type</i> - <i>wl_event_type</i>' |
|
62 | + ); |
|
63 | + ?> |
|
64 | 64 | </li> |
65 | 65 | </ol> |
66 | 66 | </li> |
67 | 67 | <li> |
68 | 68 | <?php |
69 | - printf( |
|
70 | - /* translators: 1: Triggers, 2: Custom Events. */ |
|
71 | - esc_html__( 'Go to the %1$s menu and create a new trigger of the type: %2$s.', 'wordlift' ), |
|
72 | - '<b>Triggers</b>', |
|
73 | - '<i>Custom Event</i>' |
|
74 | - ); |
|
75 | - ?> |
|
69 | + printf( |
|
70 | + /* translators: 1: Triggers, 2: Custom Events. */ |
|
71 | + esc_html__( 'Go to the %1$s menu and create a new trigger of the type: %2$s.', 'wordlift' ), |
|
72 | + '<b>Triggers</b>', |
|
73 | + '<i>Custom Event</i>' |
|
74 | + ); |
|
75 | + ?> |
|
76 | 76 | <ol> |
77 | 77 | <li> |
78 | 78 | |
79 | 79 | <?php |
80 | - printf( |
|
81 | - /* translators: 1: Event name, 2: Mentions. */ |
|
82 | - esc_html__( 'In the %1$s field input %2$s.', 'wordlift' ), |
|
83 | - '<i>Event name</i>', |
|
84 | - '<i>Mentions</i>' |
|
85 | - ); |
|
86 | - ?> |
|
80 | + printf( |
|
81 | + /* translators: 1: Event name, 2: Mentions. */ |
|
82 | + esc_html__( 'In the %1$s field input %2$s.', 'wordlift' ), |
|
83 | + '<i>Event name</i>', |
|
84 | + '<i>Mentions</i>' |
|
85 | + ); |
|
86 | + ?> |
|
87 | 87 | </li> |
88 | 88 | <li> |
89 | 89 | |
90 | 90 | <?php |
91 | - printf( |
|
92 | - /* translators: 1: Some Custom Events. */ |
|
93 | - esc_html__( 'Set this to fire on %1$s and in the filter set:', 'wordlift' ), |
|
94 | - '<i>Some Custom Events</i>' |
|
95 | - ); |
|
96 | - ?> |
|
91 | + printf( |
|
92 | + /* translators: 1: Some Custom Events. */ |
|
93 | + esc_html__( 'Set this to fire on %1$s and in the filter set:', 'wordlift' ), |
|
94 | + '<i>Some Custom Events</i>' |
|
95 | + ); |
|
96 | + ?> |
|
97 | 97 | <ol> |
98 | 98 | <li><i>event_action</i> - <i>equals</i> - <i>Mentions</i>.</li> |
99 | 99 | </ol> |
@@ -102,86 +102,86 @@ discard block |
||
102 | 102 | </li> |
103 | 103 | <li> |
104 | 104 | <?php |
105 | - printf( |
|
106 | - /* translators: 1: Tags. */ |
|
107 | - esc_html__( 'Go to the %1$s menu and create a new tag.', 'wordlift' ), |
|
108 | - '<b>Tags</b>' |
|
109 | - ); |
|
110 | - ?> |
|
105 | + printf( |
|
106 | + /* translators: 1: Tags. */ |
|
107 | + esc_html__( 'Go to the %1$s menu and create a new tag.', 'wordlift' ), |
|
108 | + '<b>Tags</b>' |
|
109 | + ); |
|
110 | + ?> |
|
111 | 111 | <ol> |
112 | 112 | <li> |
113 | 113 | |
114 | 114 | <?php |
115 | - printf( |
|
116 | - /* translators: 1: Google Analytics. */ |
|
117 | - esc_html__( 'In the tag configuration section choose %1$s. Assuming you have used variable names that match those mentioned enter:', 'wordlift' ), |
|
118 | - '<i>Google Analytics - Universal Analytics</i>' |
|
119 | - ); |
|
120 | - ?> |
|
115 | + printf( |
|
116 | + /* translators: 1: Google Analytics. */ |
|
117 | + esc_html__( 'In the tag configuration section choose %1$s. Assuming you have used variable names that match those mentioned enter:', 'wordlift' ), |
|
118 | + '<i>Google Analytics - Universal Analytics</i>' |
|
119 | + ); |
|
120 | + ?> |
|
121 | 121 | <ol> |
122 | 122 | <li> |
123 | 123 | <?php |
124 | - printf( |
|
125 | - /* translators: 1: Track Type, 2: Event. */ |
|
126 | - esc_html__( 'Set the %1$s to %2$s.', 'wordlift' ), |
|
127 | - 'Track Type', |
|
128 | - '<i>Event</i>' |
|
129 | - ); |
|
130 | - ?> |
|
124 | + printf( |
|
125 | + /* translators: 1: Track Type, 2: Event. */ |
|
126 | + esc_html__( 'Set the %1$s to %2$s.', 'wordlift' ), |
|
127 | + 'Track Type', |
|
128 | + '<i>Event</i>' |
|
129 | + ); |
|
130 | + ?> |
|
131 | 131 | </li> |
132 | 132 | <li> |
133 | 133 | <?php |
134 | - printf( |
|
135 | - /* translators: 1: wl_event_category. */ |
|
136 | - esc_html__( 'Set Category to %1$s.', 'wordlift' ), |
|
137 | - '<i>{{wl_event_category}}</i>' |
|
138 | - ); |
|
139 | - ?> |
|
134 | + printf( |
|
135 | + /* translators: 1: wl_event_category. */ |
|
136 | + esc_html__( 'Set Category to %1$s.', 'wordlift' ), |
|
137 | + '<i>{{wl_event_category}}</i>' |
|
138 | + ); |
|
139 | + ?> |
|
140 | 140 | </li> |
141 | 141 | <li> |
142 | 142 | <?php |
143 | - printf( |
|
144 | - /* translators: 1: wl_event_action. */ |
|
145 | - esc_html__( 'Set Action to %1$s.', 'wordlift' ), |
|
146 | - '<i>{{wl_event_action}}</i>' |
|
147 | - ); |
|
148 | - ?> |
|
143 | + printf( |
|
144 | + /* translators: 1: wl_event_action. */ |
|
145 | + esc_html__( 'Set Action to %1$s.', 'wordlift' ), |
|
146 | + '<i>{{wl_event_action}}</i>' |
|
147 | + ); |
|
148 | + ?> |
|
149 | 149 | </li> |
150 | 150 | <li> |
151 | 151 | <?php |
152 | - printf( |
|
153 | - /* translators: 1: wl_event_label. */ |
|
154 | - esc_html__( 'Set Label to %1$s.', 'wordlift' ), |
|
155 | - '<i>{{wl_event_label}}</i>' |
|
156 | - ); |
|
157 | - ?> |
|
152 | + printf( |
|
153 | + /* translators: 1: wl_event_label. */ |
|
154 | + esc_html__( 'Set Label to %1$s.', 'wordlift' ), |
|
155 | + '<i>{{wl_event_label}}</i>' |
|
156 | + ); |
|
157 | + ?> |
|
158 | 158 | </li> |
159 | 159 | <li> |
160 | 160 | <?php |
161 | - printf( |
|
162 | - /* translators: 1: wl_event_value. */ |
|
163 | - esc_html__( 'Set Value to %1$s.', 'wordlift' ), |
|
164 | - '<i>{{wl_event_value}}</i>' |
|
165 | - ); |
|
166 | - ?> |
|
161 | + printf( |
|
162 | + /* translators: 1: wl_event_value. */ |
|
163 | + esc_html__( 'Set Value to %1$s.', 'wordlift' ), |
|
164 | + '<i>{{wl_event_value}}</i>' |
|
165 | + ); |
|
166 | + ?> |
|
167 | 167 | </li> |
168 | 168 | <li> |
169 | 169 | <?php |
170 | - printf( |
|
171 | - /* translators: 1: True. */ |
|
172 | - esc_html__( 'Set Non-Interaction Hit to %1$s.', 'wordlift' ), |
|
173 | - '<i>True</i>' |
|
174 | - ); |
|
175 | - ?> |
|
170 | + printf( |
|
171 | + /* translators: 1: True. */ |
|
172 | + esc_html__( 'Set Non-Interaction Hit to %1$s.', 'wordlift' ), |
|
173 | + '<i>True</i>' |
|
174 | + ); |
|
175 | + ?> |
|
176 | 176 | </li> |
177 | 177 | <li> |
178 | 178 | <?php |
179 | - printf( |
|
180 | - /* translators: 1: Google Analytics Settings. */ |
|
181 | - esc_html__( 'Set the %1$s dropdown to the settings object for the Google Analytics tracking.', 'wordlift' ), |
|
182 | - '<i>Google Analytics Settings</i>' |
|
183 | - ); |
|
184 | - ?> |
|
179 | + printf( |
|
180 | + /* translators: 1: Google Analytics Settings. */ |
|
181 | + esc_html__( 'Set the %1$s dropdown to the settings object for the Google Analytics tracking.', 'wordlift' ), |
|
182 | + '<i>Google Analytics Settings</i>' |
|
183 | + ); |
|
184 | + ?> |
|
185 | 185 | </li> |
186 | 186 | </ol> |
187 | 187 | </li> |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | <?php settings_errors(); ?> |
12 | 12 | <form action="options.php" method="post"> |
13 | 13 | <?php |
14 | - settings_fields( 'wl_analytics_settings' ); |
|
15 | - do_settings_sections( 'wl_analytics_settings' ); |
|
14 | + settings_fields('wl_analytics_settings'); |
|
15 | + do_settings_sections('wl_analytics_settings'); |
|
16 | 16 | submit_button(); |
17 | 17 | ?> |
18 | 18 | </form> |
19 | 19 | <div class="info"> |
20 | - <b><?php esc_html_e( 'For Google Tag Manager there is additional setup steps needed in the GTM interface. These are the general instructions:', 'wordlift' ); ?></b> |
|
20 | + <b><?php esc_html_e('For Google Tag Manager there is additional setup steps needed in the GTM interface. These are the general instructions:', 'wordlift'); ?></b> |
|
21 | 21 | <ol> |
22 | - <li><?php esc_html_e( 'You should already have a configuration variable setup to pass data along to your provider. This is assumed to be Google Analytics and a google analytics configuration object. If you don\'t have this setup then set it up now.', 'wordlift' ); ?></li> |
|
22 | + <li><?php esc_html_e('You should already have a configuration variable setup to pass data along to your provider. This is assumed to be Google Analytics and a google analytics configuration object. If you don\'t have this setup then set it up now.', 'wordlift'); ?></li> |
|
23 | 23 | <li> |
24 | 24 | <?php |
25 | 25 | printf( |
26 | 26 | /* translators: 1: Variables, 2: Data Layer Variable. */ |
27 | - esc_html__( 'Visit the GTM dashboard and head to the %1$s menu. Add a new user-defined variable of type %2$s for each of the following items:', 'wordlift' ), |
|
27 | + esc_html__('Visit the GTM dashboard and head to the %1$s menu. Add a new user-defined variable of type %2$s for each of the following items:', 'wordlift'), |
|
28 | 28 | '<b>Variables</b>', |
29 | 29 | '<i>Data Layer Variable</i>' |
30 | 30 | ); |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | <li><i>wl_event_category</i></li> |
36 | 36 | <li><i>wl_event_label</i></li> |
37 | 37 | <li><i>wl_event_value</i></li> |
38 | - <li><i>wl_event_uri</i> <?php esc_html_e( '(which is the first custom dimension number the plugin offers)', 'wordlift' ); ?></li> |
|
39 | - <li><i>wl_index_uri</i> <?php esc_html_e( '(this is the index number sent to use as the custom dimention for uri)', 'wordlift' ); ?></li> |
|
40 | - <li><i>wl_event_type</i> <?php esc_html_e( '(which is the second custom dimension number the plugin offers)', 'wordlift' ); ?></li> |
|
41 | - <li><i>wl_index_type</i> <?php esc_html_e( '(this is the index number sent to use as the custom dimention for type)', 'wordlift' ); ?></li> |
|
38 | + <li><i>wl_event_uri</i> <?php esc_html_e('(which is the first custom dimension number the plugin offers)', 'wordlift'); ?></li> |
|
39 | + <li><i>wl_index_uri</i> <?php esc_html_e('(this is the index number sent to use as the custom dimention for uri)', 'wordlift'); ?></li> |
|
40 | + <li><i>wl_event_type</i> <?php esc_html_e('(which is the second custom dimension number the plugin offers)', 'wordlift'); ?></li> |
|
41 | + <li><i>wl_index_type</i> <?php esc_html_e('(this is the index number sent to use as the custom dimention for type)', 'wordlift'); ?></li> |
|
42 | 42 | |
43 | 43 | </ol> |
44 | 44 | </li> |
@@ -46,17 +46,17 @@ discard block |
||
46 | 46 | <?php |
47 | 47 | printf( |
48 | 48 | /* translators: 1: Google Analytics Settings. */ |
49 | - esc_html__( 'Create another variable to pass along the 2 custom dimensions with the type %1$s. For each of the 2 items set the following:', 'wordlift' ), |
|
49 | + esc_html__('Create another variable to pass along the 2 custom dimensions with the type %1$s. For each of the 2 items set the following:', 'wordlift'), |
|
50 | 50 | '<i>Google Analytics Settings</i>' |
51 | 51 | ); |
52 | 52 | ?> |
53 | 53 | <ol> |
54 | - <li><?php esc_html_e( 'Set the index to the index of the custom event you want to push this into at Google Analytics, this will usually be a number between 1 and 9.', 'wordlift' ); ?></li> |
|
54 | + <li><?php esc_html_e('Set the index to the index of the custom event you want to push this into at Google Analytics, this will usually be a number between 1 and 9.', 'wordlift'); ?></li> |
|
55 | 55 | <li> |
56 | 56 | <?php |
57 | 57 | printf( |
58 | 58 | /* translators: 1: wl_index_uri, 2: wl_index_type. */ |
59 | - esc_html__( 'Set the values of each one to the %1$s and the %2$s respectively.', 'wordlift' ), |
|
59 | + esc_html__('Set the values of each one to the %1$s and the %2$s respectively.', 'wordlift'), |
|
60 | 60 | '<i>wl_index_uri</i> - <i>wl_event_uri</i>', |
61 | 61 | '<i>wl_index_type</i> - <i>wl_event_type</i>' |
62 | 62 | ); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | <?php |
69 | 69 | printf( |
70 | 70 | /* translators: 1: Triggers, 2: Custom Events. */ |
71 | - esc_html__( 'Go to the %1$s menu and create a new trigger of the type: %2$s.', 'wordlift' ), |
|
71 | + esc_html__('Go to the %1$s menu and create a new trigger of the type: %2$s.', 'wordlift'), |
|
72 | 72 | '<b>Triggers</b>', |
73 | 73 | '<i>Custom Event</i>' |
74 | 74 | ); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | <?php |
80 | 80 | printf( |
81 | 81 | /* translators: 1: Event name, 2: Mentions. */ |
82 | - esc_html__( 'In the %1$s field input %2$s.', 'wordlift' ), |
|
82 | + esc_html__('In the %1$s field input %2$s.', 'wordlift'), |
|
83 | 83 | '<i>Event name</i>', |
84 | 84 | '<i>Mentions</i>' |
85 | 85 | ); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | <?php |
91 | 91 | printf( |
92 | 92 | /* translators: 1: Some Custom Events. */ |
93 | - esc_html__( 'Set this to fire on %1$s and in the filter set:', 'wordlift' ), |
|
93 | + esc_html__('Set this to fire on %1$s and in the filter set:', 'wordlift'), |
|
94 | 94 | '<i>Some Custom Events</i>' |
95 | 95 | ); |
96 | 96 | ?> |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | <?php |
105 | 105 | printf( |
106 | 106 | /* translators: 1: Tags. */ |
107 | - esc_html__( 'Go to the %1$s menu and create a new tag.', 'wordlift' ), |
|
107 | + esc_html__('Go to the %1$s menu and create a new tag.', 'wordlift'), |
|
108 | 108 | '<b>Tags</b>' |
109 | 109 | ); |
110 | 110 | ?> |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | <?php |
115 | 115 | printf( |
116 | 116 | /* translators: 1: Google Analytics. */ |
117 | - esc_html__( 'In the tag configuration section choose %1$s. Assuming you have used variable names that match those mentioned enter:', 'wordlift' ), |
|
117 | + esc_html__('In the tag configuration section choose %1$s. Assuming you have used variable names that match those mentioned enter:', 'wordlift'), |
|
118 | 118 | '<i>Google Analytics - Universal Analytics</i>' |
119 | 119 | ); |
120 | 120 | ?> |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | <?php |
124 | 124 | printf( |
125 | 125 | /* translators: 1: Track Type, 2: Event. */ |
126 | - esc_html__( 'Set the %1$s to %2$s.', 'wordlift' ), |
|
126 | + esc_html__('Set the %1$s to %2$s.', 'wordlift'), |
|
127 | 127 | 'Track Type', |
128 | 128 | '<i>Event</i>' |
129 | 129 | ); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | <?php |
134 | 134 | printf( |
135 | 135 | /* translators: 1: wl_event_category. */ |
136 | - esc_html__( 'Set Category to %1$s.', 'wordlift' ), |
|
136 | + esc_html__('Set Category to %1$s.', 'wordlift'), |
|
137 | 137 | '<i>{{wl_event_category}}</i>' |
138 | 138 | ); |
139 | 139 | ?> |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | <?php |
143 | 143 | printf( |
144 | 144 | /* translators: 1: wl_event_action. */ |
145 | - esc_html__( 'Set Action to %1$s.', 'wordlift' ), |
|
145 | + esc_html__('Set Action to %1$s.', 'wordlift'), |
|
146 | 146 | '<i>{{wl_event_action}}</i>' |
147 | 147 | ); |
148 | 148 | ?> |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | <?php |
152 | 152 | printf( |
153 | 153 | /* translators: 1: wl_event_label. */ |
154 | - esc_html__( 'Set Label to %1$s.', 'wordlift' ), |
|
154 | + esc_html__('Set Label to %1$s.', 'wordlift'), |
|
155 | 155 | '<i>{{wl_event_label}}</i>' |
156 | 156 | ); |
157 | 157 | ?> |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | <?php |
161 | 161 | printf( |
162 | 162 | /* translators: 1: wl_event_value. */ |
163 | - esc_html__( 'Set Value to %1$s.', 'wordlift' ), |
|
163 | + esc_html__('Set Value to %1$s.', 'wordlift'), |
|
164 | 164 | '<i>{{wl_event_value}}</i>' |
165 | 165 | ); |
166 | 166 | ?> |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | <?php |
170 | 170 | printf( |
171 | 171 | /* translators: 1: True. */ |
172 | - esc_html__( 'Set Non-Interaction Hit to %1$s.', 'wordlift' ), |
|
172 | + esc_html__('Set Non-Interaction Hit to %1$s.', 'wordlift'), |
|
173 | 173 | '<i>True</i>' |
174 | 174 | ); |
175 | 175 | ?> |
@@ -178,14 +178,14 @@ discard block |
||
178 | 178 | <?php |
179 | 179 | printf( |
180 | 180 | /* translators: 1: Google Analytics Settings. */ |
181 | - esc_html__( 'Set the %1$s dropdown to the settings object for the Google Analytics tracking.', 'wordlift' ), |
|
181 | + esc_html__('Set the %1$s dropdown to the settings object for the Google Analytics tracking.', 'wordlift'), |
|
182 | 182 | '<i>Google Analytics Settings</i>' |
183 | 183 | ); |
184 | 184 | ?> |
185 | 185 | </li> |
186 | 186 | </ol> |
187 | 187 | </li> |
188 | - <li><?php esc_html_e( 'In the triggering tag select the firing trigger you created previously.', 'wordlift' ); ?></li> |
|
188 | + <li><?php esc_html_e('In the triggering tag select the firing trigger you created previously.', 'wordlift'); ?></li> |
|
189 | 189 | </ol> |
190 | 190 | </li> |
191 | 191 | </ol> |