id = 'addons'; $this->label = __( 'Add Ons', '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_addons', array( $this, 'addons_setting' ) ); } /** * Get settings array * * @return array */ public function get_settings() { global $hide_save_button; $hide_save_button = TRUE; return apply_filters( 'propertyhive_add_on_settings', array( array( 'title' => __( 'Add Ons', 'propertyhive' ), 'type' => 'title', 'desc' => '', 'id' => 'add_on_options' ), array( 'type' => 'addons', ), array( 'type' => 'sectionend', 'id' => 'add_on_options') ) ); // End add on settings } /** * Output the settings */ public function output() { $settings = $this->get_settings(); PH_Admin_Settings::output_fields( $settings ); } /** * Output list of offices * * @access public * @return void */ public function addons_setting() { global $post; $add_ons = @file_get_contents('http://wp-property-hive.com/add-ons-json.php'); ?>
'. __('No add ons are currently available for Property Hive. As add ons become available they will appear here. Please check back soon.', 'propertyhive') . '
'; } } else { echo ''. __('Unable to retrieve list of add-ons. Please visit the Property Hive add ons page to view a full list of add ons available.', 'propertyhive') . '
'; echo '