PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/abstract-settings.php +5 -7 4.4.04.4.8 View file →
@@ -1,8 +1,11 @@
1 1 <?php
2 2 /**
3 3 * Class LP_Abstract_Settings
4 4 */
5 +
6 +use LearnPress\TemplateHooks\Admin\AdminSettingsPage;
7 +
5 8 abstract class LP_Abstract_Settings {
6 9
7 10 /**
8 11 * LP_Abstract_Settings constructor.
@@ -35,15 +38,10 @@
35 38 *
36 39 * @return mixed
37 40 */
38 41 public function get_admin_field_name( $name ) {
39 - $items = LP_Admin_Menu::instance()->get_menu_items();
40 - $section = '';
41 -
42 - if ( ! empty( $items['settings'] ) ) {
43 - $tab = $items['settings']->get_active_tab();
44 - $section = $items['settings']->get_active_section();
45 - }
42 + $tab = AdminSettingsPage::instance()->get_active_tab();
43 + $section = AdminSettingsPage::instance()->get_active_section();
46 44
47 45 if ( $tab === 'payments' && $section !== 'general' && ! empty( $name ) ) {
48 46 if ( strpos( $name, '[' ) === 0 ) {
49 47 $name = $section . $name;