Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(emails): Add backward compatibility for keys #3585

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

Sidsector9
Copy link
Contributor

Closes #3584

Description

This PR updates the method used to register email tags.

Screenshots (jpeg or gifs if applicable):

rec_tags

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@@ -82,6 +82,7 @@ public function add( $args ) {
'context' => give_check_variable( $args['context'], 'empty', 'general' ),
'is_admin' => (bool) $args['is_admin'], // Introduced in 2.2.1
'description' => $args['desc'], // deprecated in 2.2.1
'function' => $args['func'], // deprecated in 2.2.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sidsector9 remove this code. there is no need for this code.

@@ -1394,6 +1395,15 @@ function __give_211_bc_email_template_tag_param( &$args, $func_args = array() )
'is_admin' => false,
);
} else {

if ( array_key_exists( 'description', $args ) ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sidsector9 please write comment on code that it is for backward compatibility use desc or func instead

@Sidsector9
Copy link
Contributor Author

@ravinderk I made the changes, ready to merge.

@ravinderk ravinderk merged commit 1bcddd2 into release/2.2.3 Aug 8, 2018
@ravinderk ravinderk deleted the issue/3584 branch August 8, 2018 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants