Skip to content

Commit

Permalink
* fix for PHP5.6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCherniatev committed Apr 12, 2019
1 parent f8dc2eb commit 9699f4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inc/leyka-class-options-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public function get_info_of($option_id) {

$this->_intialize_option($option_id, true);

$this->_options[$option_id] = array(
$filtered_options = array(
'title' => apply_filters('leyka_option_title-'.$option_id, $this->_options[$option_id]['title']),
'type' => apply_filters('leyka_option_type-'.$option_id, $this->_options[$option_id]['type']),
'required' => apply_filters(
Expand All @@ -368,7 +368,8 @@ public function get_info_of($option_id) {
'leyka_option_default-'.$option_id,
empty($option_data['default']) ? '' : $option_data['default']
),
) + $this->_options[$option_id];
);
$this->_options[$option_id] = array_merge($filtered_options, $this->_options[$option_id]);

return apply_filters('leyka_option_info-'.$option_id, $this->_options[$option_id]);

Expand Down

0 comments on commit 9699f4f

Please sign in to comment.