Skip to content

Commit

Permalink
moved - edac_documentation_link
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveJonesDev committed Dec 16, 2023
1 parent 2a34359 commit a9129e1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
32 changes: 0 additions & 32 deletions accessibility-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,38 +481,6 @@ function edac_update_post_meta( $rule ) {
}
}

/**
* Documentation Link.
*
* @param array $rule to get link from.
* @return string markup for link.
*/
function edac_documentation_link( $rule ) {
global $wp_version;
$days_active = edac_days_active();

if ( ! $rule['info_url'] || ! isset( $rule['slug'] ) ) {
return '';
}

return add_query_arg(
array(
'utm_source' => 'accessibility-checker',
'utm_medium' => 'software',
'utm_term' => esc_attr( $rule['slug'] ),
'utm_content' => 'content-analysis',
'utm_campaign' => 'wordpress-general',
'php_version' => PHP_VERSION,
'platform' => 'wordpress',
'platform_version' => $wp_version,
'software' => 'free',
'software_version' => EDAC_VERSION,
'days_active' => $days_active,
),
$rule['info_url']
);
}

/**
* Output simplified summary
*
Expand Down
32 changes: 32 additions & 0 deletions includes/helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,38 @@ function edac_days_active() {
return 0;
}

/**
* Documentation Link.
*
* @param array $rule to get link from.
* @return string markup for link.
*/
function edac_documentation_link( $rule ) {
global $wp_version;
$days_active = edac_days_active();

if ( ! $rule['info_url'] || ! isset( $rule['slug'] ) ) {
return '';
}

return add_query_arg(
array(
'utm_source' => 'accessibility-checker',
'utm_medium' => 'software',
'utm_term' => esc_attr( $rule['slug'] ),
'utm_content' => 'content-analysis',
'utm_campaign' => 'wordpress-general',
'php_version' => PHP_VERSION,
'platform' => 'wordpress',
'platform_version' => $wp_version,
'software' => 'free',
'software_version' => EDAC_VERSION,
'days_active' => $days_active,
),
$rule['info_url']
);
}

/**
* Custom Post Types
*
Expand Down

0 comments on commit a9129e1

Please sign in to comment.