$taxName,'hide_empty'=>false)); $newARR = array(); foreach($taxonomy as $term){ $tid = $term->term_id; $name = $term->name; $newARR[$tid]=$name; } if($newARR){ return $newARR; } } # GET TERM NAME USING ID public static function get_term_name($tid){ if(get_term($tid)){ $term = get_term($tid); return $term->name; } } # GET PAGE ID BY PAGE SLUG public static function get_id_by_slug($page_slug){ $page = get_page_by_path($page_slug); if ($page) { return $page->ID; } else { return null; } } public function custom_menu_order($menu_ord) { if (!$menu_ord) return true; return array( 'index.php', // Dashboard 'abr-user-help', 'availability-manager', 'edit.php?post_type=leasing', 'edit.php?post_type=apartment', 'edit.php?post_type=community', 'edit.php?post_type=realestate', 'abr-application-form', 'edit.php?post_type=virtualtour', ); } public function custom_query_variable($vars) { $vars[] .= 'paged'; return $vars; } } add_action('plugins_loaded',array('About_rental_cf_exe','init')); #-----------------------------------------------/ # Add CLASSES and supoortted files into plugin / #---------------------------------------------/ /**-------- Admin ---------**/ include(ABR_PLUGIN_DIR_PATH.'admin/email.php'); include(ABR_PLUGIN_DIR_PATH.'admin/favorites.php'); include(ABR_PLUGIN_DIR_PATH.'admin/apartment.php'); include(ABR_PLUGIN_DIR_PATH.'admin/community.php'); include(ABR_PLUGIN_DIR_PATH.'admin/leasing-special.php'); include(ABR_PLUGIN_DIR_PATH.'admin/single-apartment.php'); include(ABR_PLUGIN_DIR_PATH.'admin/single-community.php'); include(ABR_PLUGIN_DIR_PATH.'admin/ar-virtual-tours.php'); include(ABR_PLUGIN_DIR_PATH.'add-on/sweetalert/index.php'); include(ABR_PLUGIN_DIR_PATH.'admin/apartment-listing.php'); include(ABR_PLUGIN_DIR_PATH.'admin/community-listing.php'); include(ABR_PLUGIN_DIR_PATH.'admin/featured-apartments.php'); include(ABR_PLUGIN_DIR_PATH.'admin/apartment-application.php'); include(ABR_PLUGIN_DIR_PATH.'admin/apartment-of-spec-comm.php'); include(ABR_PLUGIN_DIR_PATH.'admin/leasing-special-shortcode.php'); /**--------- Widget ----------**/ include(ABR_PLUGIN_DIR_PATH.'widget/apartment-widgets.php'); /**--------- Add On ----------**/ require_once('add-on/session/wp-session-manager.php'); /**---------- Cmb2 ----------**/ include(ABR_PLUGIN_DIR_PATH.'cmb2/init.php'); include(ABR_PLUGIN_DIR_PATH.'cmb2/add-on/select2-field/cmb-field-select2.php'); include(ABR_PLUGIN_DIR_PATH.'cmb2/add-on/date-range-field/wds-cmb2-date-range-field.php'); include(ABR_PLUGIN_DIR_PATH.'cmb2/add-on/cmb_field_map/cmb-field-map.php'); /**---------- Includes ----------**/ include(ABR_PLUGIN_DIR_PATH.'includes/application-form.php'); include(ABR_PLUGIN_DIR_PATH.'includes/shortcodes.php'); include(ABR_PLUGIN_DIR_PATH.'includes/pagination.php'); /**---------- Premium Feature ----------**/ include(ABR_PLUGIN_DIR_PATH.'admin/premium/premium-init.php');