PHP Class Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\URLFilter

Since: 3.0.0
Show file Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\PostTypeRepository $post_type_repository ) Constructor. Sets up the properties.
disable ( ) : boolean Removes the filter.
enable ( ) : boolean Adds the filter.
unprettify_permalink ( string $post_link, WP_Post $post ) : string Filters the post type link URL and returns a query-based representation, if set for the according post type.

Private Methods

Method Description
is_draft_or_pending ( WP_Post $post ) : boolean Checks if the given post is a draft or pending.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\PostTypeRepository $post_type_repository )
$post_type_repository Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\PostTypeRepository Post type repository object.

disable() public method

Removes the filter.
Since: 3.0.0
public disable ( ) : boolean
return boolean Whether or not the filter was removed successfully.

enable() public method

Adds the filter.
Since: 3.0.0
public enable ( ) : boolean
return boolean Whether or not the filter was added successfully.