Skip to content

Commit

Permalink
nest filters remove unnecessary vars
Browse files Browse the repository at this point in the history
  • Loading branch information
tn3rb committed Jul 25, 2022
1 parent 23d7ec4 commit 72941e3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions core/libraries/messages/EE_messenger.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,16 +652,20 @@ class="button button--secondary button--tiny edit-mtpg-button"


/**
* get_template_fields
* returns $this->_template_fields,
* filtered first by child class specific filter named something like
* FHEE__EE_Email_messenger__get_template_fields,
* followed by global FHEE__EE_messenger__get_template_fields filter
*
* @access public
* @return array $this->_template_fields
* @return array
*/
public function get_template_fields()
public function get_template_fields(): array
{
$template_fields = apply_filters('FHEE__' . get_class($this) . '__get_template_fields', $this->_template_fields, $this);
$template_fields = apply_filters('FHEE__EE_messenger__get_template_fields', $template_fields, $this);
return $template_fields;
return (array) apply_filters(
'FHEE__EE_messenger__get_template_fields',
apply_filters('FHEE__' . get_class($this) . '__get_template_fields', $this->_template_fields, $this),
$this
);
}


Expand Down

0 comments on commit 72941e3

Please sign in to comment.