PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | includes/admin/settings/class-settings-addon.php +5 -4 2.3.04.16.9 View file →
@@ -3,9 +3,9 @@
3 3 * Give Settings Page/Tab
4 4 *
5 5 * @package Give
6 6 * @subpackage Classes/Give_Settings_Addon
7 - * @copyright Copyright (c) 2016, WordImpress
7 + * @copyright Copyright (c) 2016, GiveWP
8 8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 9 * @since 1.8
10 10 */
11 11
@@ -41,9 +41,9 @@
41 41 function set_default_setting_tab( $setting_tab ) {
42 42 $default_tab = '';
43 43
44 44 // Set default tab to first setting tab.
45 - if( $sections = array_keys( $this->get_sections() ) ) {
45 + if ( $sections = array_keys( $this->get_sections() ) ) {
46 46 $default_tab = current( $sections );
47 47 }
48 48 return $default_tab;
49 49 }
@@ -55,11 +55,12 @@
55 55 * @param array $pages Lst of pages.
56 56 * @return array
57 57 */
58 58 public function add_settings_page( $pages ) {
59 - $setting = $this->get_settings();
59 + $sections = $this->get_sections();
60 +
60 61 // Bailout: Do not add addons setting tab if it does not contain any setting fields.
61 - if( ! empty( $setting ) ) {
62 + if ( ! empty( $sections ) ) {
62 63 $pages[ $this->id ] = $this->label;
63 64 }
64 65
65 66 return $pages;