id = 'features'; $this->label = __( 'Features', 'propertyhive' ); add_filter( 'propertyhive_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); add_action( 'propertyhive_settings_' . $this->id, array( $this, 'output' ) ); add_action( 'propertyhive_admin_field_pro_features', array( $this, 'pro_features_setting' ) ); } public function get_settings() { $settings = array( array( 'title' => __( 'Active Features', 'propertyhive' ), 'type' => 'title', 'desc' => '', 'id' => 'pro_active_features_settings' ) ); $settings[] = array( 'type' => 'pro_features', ); $settings[] = array( 'type' => 'sectionend', 'id' => 'pro_active_features_settings'); return $settings; } public function pro_features_setting() { $features = get_ph_pro_features(); echo '
'; // filters $categories = array( '' => 'All', 'import' => 'Property Import', 'export' => 'Portal Feeds', 'website' => 'Website Tools', 'crm' => 'CRM Tools', 'data-bridges' => 'Data Bridges', 'free' => 'Free', ); $selected_category = ''; if ( isset($_GET['profilter']) && array_key_exists(sanitize_text_field($_GET['profilter']), $categories) ) { $selected_category = sanitize_text_field($_GET['profilter']); } echo '
'; echo ''; echo '
'; // Check if AI Property Search is in list. If not, it can't have been launched yet and to show promo instead /*$ai_property_search_found = false; foreach ( $features as $feature ) { $slug = explode("/", $feature['wordpress_plugin_file']); $slug = $slug[0]; if ( strpos($slug, 'propertyhive-ai-property-search') !== false ) { $ai_property_search_found = true; break; } }*/ // list of features echo '
'; echo '
'; echo '
'; } /** * Output the settings */ public function output() { global $current_section, $hide_save_button; $hide_save_button = true; $settings = $this->get_settings(); PH_Admin_Settings::output_fields( $settings ); } } endif; return new PH_Settings_Features();