Class AreaCache
Class AreaCache
Package: hji\geofarms\controllers
Since: 1.1.6
Located at classes/controllers/AreaCache.php
Methods summary
public
|
|
public
|
#
create_area_cache_json_callback( )
Callback for JSON Admin Command A button on the GeoFarms settings page triggers this callback which fires the generateGeoFarmsTransient() method. |
public
integer
|
#
generateGeoFarmsTransient( boolean $refresh = false )
Gets our GeoFarms areas map data and stores them in a transient array. |
public
|
#
retrieveGeoFarmsMarkets( null $post_id = null )
Save MLS markets array Generates an array of MLS markets that each area can be associated with. For use with the area cache. Uses the map (community object) that is associated with the area. Triggered automatically by mapGeoFarmArea() |
public
boolean
|
#
mapGeoFarmArea( null $post_id = null )
Generate map data from slipstream for one or more GeoFarm areas If you pass a post ID(s) to this method, it will run against only those post IDs. If no post ID is passed, it will run on all areas in the database. Calls retrieveGeoFarmsMarkets() when finished. Uses the polygon ID from the shortcode entered into the listing display area of the area. |
public
|
#
bulk_post_admin_footer( )
Loads JS Bulk Edit On the GeoFarms area list page the following method adds JS to the admin which creates our new bulk action select |
public
|
#
bulk_post_action( )
Custom Bulk Post Action Callback This method is trigger when a user chooses to bulk generate new maps for selected GeoFarms areas from the post list table. |
public
|
#
bulk_post_admin_notices( )
Custom Bulk Actions Admin Notices Creates and displays the admin notices of the custom bulk action above. |
Properties summary
public static
|
$postArgs
|
|
public static
|
$areas
|
|
public static
|
$membership
|
|
public static
|
$apiController
|
|
public static
|
$geoAreaTransient
|
|
protected
|
$postType
|