PHP Class Papi_Admin_Ajax, papi

显示文件 Open project: wp-papi/papi

Protected Properties

Property Type Description
$action_prefix string The action prefix for Papi ajax actions.

Public Methods

Method Description
__construct ( ) The construct.
add_endpoint ( ) Add ajax endpoint.
ajax_url ( ) Add ajax url to Papi JavaScript object.
get_posts ( ) Get posts via GET.
get_properties ( ) Get properties via POST.
get_property ( ) Get property html via GET.
get_rules_result ( ) Get rules result via GET.
get_shortcode ( ) Get shortcode via GET.
get_terms ( ) Get terms via GET.
handle_papi_ajax ( ) Handle Papi ajax.
render_error ( string $message ) Render error message.

Protected Methods

Method Description
setup_actions ( ) Setup action hooks.

Method Details

__construct() public method

The construct.
public __construct ( )

add_endpoint() public method

Add ajax endpoint.
public add_endpoint ( )

ajax_url() public method

Add ajax url to Papi JavaScript object.
public ajax_url ( )

get_posts() public method

Posts with empty title will be ignored. GET /papi-ajax/?action=get_posts
public get_posts ( )

get_properties() public method

POST /papi-ajax/?action=get_properties
public get_properties ( )

get_property() public method

GET /papi-ajax/?action=get_property
public get_property ( )

get_rules_result() public method

GET /papi-ajax/?action=get_rules_result
public get_rules_result ( )

get_shortcode() public method

GET /papi-ajax/?action=get_shortcode
public get_shortcode ( )

get_terms() public method

GET /papi-ajax/?action=get_terms
public get_terms ( )

handle_papi_ajax() public method

Handle Papi ajax.
public handle_papi_ajax ( )

render_error() public method

Render error message.
public render_error ( string $message )
$message string

setup_actions() protected method

Setup action hooks.
protected setup_actions ( )

Property Details

$action_prefix protected_oe property

The action prefix for Papi ajax actions.
protected string $action_prefix
return string