PHP Class Inpsyde\MultilingualPress\Common\ConditionalAwareRequest

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Common\Request
Show file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( ) Constructor. Sets up the properties.
post_type ( ) : string Returns the (first) post type of the current request.
queried_object_id ( ) : integer Returns the ID of the queried object.
type ( ) : string Returns the type of the current request.

Private Methods

Method Description
is_page_for_posts ( ) : boolean
is_singular ( ) : boolean
is_term_archive ( ) : boolean

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( )

post_type() public method

Returns the (first) post type of the current request.
Since: 3.0.0
public post_type ( ) : string
return string The (first) post type, or empty string if not applicable.

queried_object_id() public method

For term archives, this is the term taxonomy ID (not the term ID).
Since: 3.0.0
public queried_object_id ( ) : integer
return integer The ID of the queried object.

type() public method

Returns the type of the current request.
Since: 3.0.0
public type ( ) : string
return string Request type, or empty string on failure.