Skip to content

Commit d2a3ccf

Browse files
committed
Merge branch 'william/pro-165-urls-missing-utm-parameters-in-plugin' of github.com:equalizedigital/accessibility-checker into william/pro-165-urls-missing-utm-parameters-in-plugin
2 parents d2776c8 + 4095f12 commit d2a3ccf

10 files changed

Lines changed: 39 additions & 36 deletions

admin/class-accessibility-statement.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ public static function add_page() {
5353
sprintf( __( '[YOUR COMPANY NAME] is committed to providing a fully accessible website experience for all users of all abilities, including those who rely on assistive technologies like screen readers, screen enlargement software, and alternative keyboard input devices to navigate the web.', 'accessibility-checker' ) ),
5454
__( 'Ongoing Efforts to Ensure Accessibility', 'accessibility-checker' ),
5555
sprintf( __( 'We follow the <a href="https://www.w3.org/TR/WCAG21/">Web Content Accessibility Guidelines (WCAG) version 2.1</a> as our guiding principle for determining accessibility. These are internationally agreed-upon standards that cover a wide range of recommendations and best practices for making content useable. As we add new pages and functionality to our website, all designs, code, and content entry practices are checked against these standards.', 'accessibility-checker' ) ),
56-
sprintf( __( 'Website accessibility is an ongoing process. We continually test content and features for WCAG 2.1 Level AA compliance and remediate any issues to ensure we meet or exceed the standards. Testing of our website is performed by our team members using industry-standard tools such as the <a href="https://a11ychecker.com/">Accessibility Checker WordPress Plugin</a>, color contrast analyzers, keyboard-only navigation techniques, and Flesch-Kincaid readability tests.', 'accessibility-checker' ) ),
56+
sprintf(
57+
/* translators: 1 - A link opening tag, 2 - link closing tag */
58+
__( 'Website accessibility is an ongoing process. We continually test content and features for WCAG 2.1 Level AA compliance and remediate any issues to ensure we meet or exceed the standards. Testing of our website is performed by our team members using industry-standard tools such as the %1$sAccessibility Checker WordPress Plugin%2$s, color contrast analyzers, keyboard-only navigation techniques, and Flesch-Kincaid readability tests.', 'accessibility-checker' ),
59+
'<a href="' . esc_url( 'https://a11ychecker.com/?utm_source=accessibility-checker&utm_medium=software&utm_campaign=wordpress-general' ) . '">',
60+
'</a>'
61+
),
5762
__( 'Accessibility Features On Our Website', 'accessibility-checker' ),
5863
__( 'The following is a list of items we have included in our website to improve its accessibility:', 'accessibility-checker' ),
5964
__( '[LIST ACCESSIBILITY FEATURES HERE]', 'accessibility-checker' ),

admin/class-admin-notices.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function welcome_page_post_count_change_notice() {
8888
<div class="notice notice-info is-dismissible edac-stats-improvement-notice">
8989
<p>
9090
<?php
91-
$release_post_link = edac_generate_link_type( [], 'custom', [ 'base_link' => 'https://equalizedigital.com/corrected-calculations-in-accessibility-checker-pro-and-audit-history/' ] );
91+
$release_post_link = edac_link_wrapper( 'https://equalizedigital.com/corrected-calculations-in-accessibility-checker-pro-and-audit-history/', 'admin-notice', 'stats-improvement', false );
9292
printf(
9393
// translators: %1$s is the opening anchor tag, %2$s is the closing anchor tag.
9494
esc_html__( 'We have improved the statistics calculations in version 1.21.0. As a result, some numbers in the data below may have changed. Read more in our %1$srelease announcement post%2$s.', 'accessibility-checker' ),
@@ -202,8 +202,8 @@ public function edac_get_black_friday_message() {
202202
$message = '<div class="edac_black_friday_notice notice notice-info is-dismissible">';
203203
$message .= '<p><strong>' . esc_html__( '🎉 Black Friday special! 🎉', 'accessibility-checker' ) . '</strong><br />';
204204
$message .= esc_html__( 'Upgrade to a paid version of Accessibility Checker from November 25th to December 3rd and get 30% off! Full site scanning, site-wide open issues report, ignore logs, and more.', 'accessibility-checker' ) . '<br />';
205-
$message .= '<a class="button button-primary" href="' . esc_url( edac_simple_utm_link_wrapper( 'https://my.equalizedigital.com/support/pre-sale-questions/', 'BF2025-admin-notice', 'presale', false ) ) . '">' . esc_html__( 'Ask a Pre-Sale Question', 'accessibility-checker' ) . '</a> ';
206-
$message .= '<a class="button button-primary" href="' . esc_url( edac_simple_utm_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'BF2025-admin-notice', 'pricing', false ) ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
205+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://my.equalizedigital.com/support/pre-sale-questions/', 'BF2025-admin-notice', 'presale', false ) ) . '">' . esc_html__( 'Ask a Pre-Sale Question', 'accessibility-checker' ) . '</a> ';
206+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'BF2025-admin-notice', 'pricing', false ) ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
207207
$message .= '</div>';
208208

209209
return $message;
@@ -289,8 +289,8 @@ public function edac_get_gaad_promo_message() {
289289
$message = '<div class="edac_gaad_notice notice notice-info is-dismissible">';
290290
$message .= '<p><strong>' . esc_html__( '🎉 Get 25% off Accessibility Checker Pro in honor of Global Accessibility Awareness Day! 🎉', 'accessibility-checker' ) . '</strong><br />';
291291
$message .= esc_html__( 'Use coupon code GAAD25 from May 13th-May 21st to get access to full-site scanning and other pro features at a special discount. Not sure if upgrading is right for you?', 'accessibility-checker' ) . '<br />';
292-
$message .= '<a class="button button-primary" href="' . esc_url( edac_simple_utm_link_wrapper( 'https://equalizedigital.com/contact/', 'GAAD25-admin-notice', 'presale', false ) ) . '">' . esc_html__( 'Ask a Pre-Sale Question', 'accessibility-checker' ) . '</a> ';
293-
$message .= '<a class="button button-primary" href="' . esc_url( edac_simple_utm_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'GAAD25-admin-notice', 'pricing', false ) ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
292+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/contact/', 'GAAD25-admin-notice', 'presale', false ) ) . '">' . esc_html__( 'Ask a Pre-Sale Question', 'accessibility-checker' ) . '</a> ';
293+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'GAAD25-admin-notice', 'pricing', false ) ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
294294
$message .= '</div>';
295295

296296
return $message;

admin/class-ajax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ function ( $a, $b ) {
336336
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Using direct query for interacting with custom database, safe variable used for table name, caching not required for one time operation.
337337
$expand_rule = count( $wpdb->get_results( $wpdb->prepare( 'SELECT id FROM %i where postid = %d and rule = %s and siteid = %d', $table_name, $postid, $rule['slug'], $siteid ), ARRAY_A ) );
338338

339-
$tool_tip_link = edac_simple_utm_link_wrapper( $rule['info_url'], 'frontend-highlighter', $rule['slug'], false );
339+
$tool_tip_link = edac_link_wrapper( $rule['info_url'], 'frontend-highlighter', $rule['slug'], false );
340340

341341
$html .= '<div class="edac-details-rule">';
342342

@@ -685,7 +685,7 @@ public function readability() {
685685
</form>';
686686
}
687687

688-
$html .= '<span class="dashicons dashicons-info"></span><a href="' . esc_url( edac_simple_utm_link_wrapper( 'https://a11ychecker.com/help3265', 'wordpress-general', 'content-analysis', false ) ) . '" target="_blank">Learn more about improving readability and simplified summary requirements</a>';
688+
$html .= '<span class="dashicons dashicons-info"></span><a href="' . esc_url( edac_link_wrapper( 'https://a11ychecker.com/help3265', 'wordpress-general', 'content-analysis', false ) ) . '" target="_blank">Learn more about improving readability and simplified summary requirements</a>';
689689

690690
if ( ! $html ) {
691691

admin/class-frontend-highlight.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function ajax() {
113113
$array['slug'] = $rule[0]['slug'];
114114
$array['rule_title'] = $rule[0]['title'];
115115
$array['summary'] = $rule[0]['summary'];
116-
$array['link'] = edac_simple_utm_link_wrapper( $rule[0]['info_url'], 'frontend-highlighter', $rule[0]['slug'], false );
116+
$array['link'] = edac_link_wrapper( $rule[0]['info_url'], 'frontend-highlighter', $rule[0]['slug'], false );
117117
$array['object'] = html_entity_decode( esc_html( $result['object'] ) );
118118
$array['id'] = $result['id'];
119119
$array['ignored'] = $result['ignre'];

admin/class-welcome-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public static function render_summary() {
302302
<?php esc_html_e( 'Start scanning your entire website for accessibility issues, get full-site reports, and become compliant with accessibility guidelines faster.', 'accessibility-checker' ); ?>
303303
</p>
304304
<p class="edac-align-center">
305-
<a class="button button-primary" href="<?php edac_simple_utm_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'welcome-page', 'upgrade' ); ?>" target="_blank" rel="noopener noreferrer">
305+
<a class="button button-primary" href="<?php edac_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'welcome-page', 'upgrade' ); ?>" target="_blank" rel="noopener noreferrer">
306306
<?php esc_html_e( 'Upgrade Accessibility Checker', 'accessibility-checker' ); ?>
307307
</a>
308308
</p>

admin/class-widgets.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function render_dashboard_scan_summary() {
133133
</div>
134134
';
135135

136-
$manually_check_link = edac_simple_utm_link_wrapper(
136+
$manually_check_link = edac_link_wrapper(
137137
'https://equalizedigital.com/accessibility-checker/how-to-manually-check-your-website-for-accessibility/?utm_source=accessibility-checker&utm_medium=software&utm_campaign=dashboard-widget',
138138
'dashboard-widget',
139139
'how-to-manually-check',
@@ -292,13 +292,13 @@ public function render_dashboard_scan_summary() {
292292
<hr class="edac-hr" />
293293
<div class="edac-widget-footer-link-list">';
294294

295-
$blog_link = edac_simple_utm_link_wrapper(
295+
$blog_link = edac_link_wrapper(
296296
'https://equalizedigital.com/accessibility-checker/documentation/?utm_source=accessibility-checker&utm_medium=software&utm_campaign=dashboard-widget',
297297
'dashboard-widget',
298298
'blog',
299299
false
300300
);
301-
$docs_link = edac_simple_utm_link_wrapper(
301+
$docs_link = edac_link_wrapper(
302302
'https://equalizedigital.com/accessibility-checker/documentation/?utm_source=accessibility-checker&utm_medium=software&utm_campaign=dashboard-widget',
303303
'dashboard-widget',
304304
'docs',

includes/classes/Fixes/Fix/SkipLinkFix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function skip_link_section_callback() {
234234
sprintf(
235235
// translators: %1$s: opening anchor tag, %2$s: closing anchor tag.
236236
__( 'If your theme is not already adding a skip link that allows keyboard users to bypass the navigation and quickly jump to the main content, enable skip links here. %1$sLearn more about skip links.%2$s', 'accessibility-checker' ),
237-
'<a href="' . esc_url( 'https://equalizedigital.com/how-to-make-your-wordpress-site-more-accessible-with-skip-links/' ) . '">',
237+
'<a href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/how-to-make-your-wordpress-site-more-accessible-with-skip-links/', 'fix-description', 'skip-link', false ) ) . '">',
238238
'</a>'
239239
)
240240
);

includes/helper-functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ function edac_generate_link_type( $query_args = [], $type = 'pro', $args = [] ):
591591
}
592592

593593
/**
594-
* Echo a link with some utms.
594+
* Echo or return a link with some utms.
595595
*
596596
* This is just a simplified wrapper around `edac_generate_link_type` to generate a link with UTM parameters.
597597
*
@@ -602,7 +602,7 @@ function edac_generate_link_type( $query_args = [], $type = 'pro', $args = [] ):
602602
*
603603
* @return void|string
604604
*/
605-
function edac_simple_utm_link_wrapper( $base_url, $campaign = '', $content = '', $directly_echo = true ) {
605+
function edac_link_wrapper( $base_url, $campaign = '', $content = '', $directly_echo = true ) {
606606
if ( empty( $base_url ) || ! is_string( $base_url ) ) {
607607
return;
608608
}

includes/options-page.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ function edac_general_cb() {
242242
printf(
243243
/* translators: %1$s: link to the plugin documentation website. */
244244
esc_html__( 'Use the settings below to configure Accessibility Checker. Additional information about each setting can be found in the %1$s.', 'accessibility-checker' ),
245-
'<a href="' . esc_url( edac_simple_utm_link_wrapper( 'https://a11ychecker.com/', 'settings-page', '', false ) ) . '" target="_blank" aria-label="' . esc_attr__( 'plugin documentation (opens in a new window)', 'accessibility-checker' ) . '">' . esc_html__( 'plugin documentation', 'accessibility-checker' ) . '</a>'
245+
'<a href="' . esc_url( edac_link_wrapper( 'https://a11ychecker.com/', 'settings-page', '', false ) ) . '" target="_blank" aria-label="' . esc_attr__( 'plugin documentation (opens in a new window)', 'accessibility-checker' ) . '">' . esc_html__( 'plugin documentation', 'accessibility-checker' ) . '</a>'
246246
);
247247

248248
if ( EDAC_KEY_VALID === false ) {
@@ -254,9 +254,7 @@ function edac_general_cb() {
254254
[
255255
'utm_campaign' => 'settings-page',
256256
'utm_content' => 'features-and-support',
257-
],
258-
'pro',
259-
[ 'base_link' => 'https://equalizedigital.com/accessibility-checker/pricing/' ]
257+
]
260258
)
261259
) . '" target="_blank" aria-label="' . esc_attr__( 'Accessibility Checker Pro (opens in a new window)', 'accessibility-checker' ) . '">' . esc_html__( 'Accessibility Checker Pro', 'accessibility-checker' ) . '</a>'
262260
);
@@ -463,7 +461,7 @@ function edac_post_types_cb() {
463461
<?php
464462
echo esc_html__( 'To check content other than posts and pages, please ', 'accessibility-checker' );
465463
?>
466-
<a href="<?php edac_simple_utm_link_wrapper( 'https://my.equalizedigital.com/', 'settings-page' ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html__( 'upgrade to pro', 'accessibility-checker' ); ?></a>
464+
<a href="<?php edac_link_wrapper( 'https://my.equalizedigital.com/', 'settings-page' ); ?>" target="_blank" rel="noopener noreferrer"><?php echo esc_html__( 'upgrade to pro', 'accessibility-checker' ); ?></a>
467465
<?php esc_html_e( ' (opens in a new window)', 'accessibility-checker' ); ?>
468466
</p>
469467
<?php } else { ?>

0 commit comments

Comments
 (0)