AttributesCPT extends EditableCPT
in package

Table of Contents

$capability  : string
$editPage  : EditCPTPage
$fieldGroups  : array<string|int, MetaBoxGroup>
$managePage  : ManageCPTPage
$postType  : mixed
__construct()  : mixed
addBackButton()  : mixed
getCapabilityType()  : array<string|int, mixed>
Create an array of capability types depending on a post type name.
getEditPage()  : EditCPTPage
getFieldGroups()  : array<string|int, MetaBoxGroup>
getManagePage()  : ManageCPTPage
getMenuSlug()  : mixed
getPostType()  : mixed
handlePostDeletion()  : mixed
Fired just before delete the post from database.
handlePostUpdate()  : array<string|int, mixed>
Fired when new post created or updated.
initEditPage()  : mixed
initManagePage()  : mixed
isCurrentEditPage()  : mixed
maybeFlushRewriteRules()  : mixed
register()  : mixed
registerImportingTaxonomy()  : mixed
Import listener for default WordPress importer.
registerMetaBoxes()  : mixed
registerOcdiTaxonomy()  : array<string|int, mixed>
Import listener for plugin One Click Demo Import. Fixes "[WARNING] Failed to import mphb_ra_..." warnings in content import.
supportAttributesMenuOrder()  : array<string|int, mixed>
Add "menu_order" ordering to get_terms() (support a custom order in attributes).
addActions()  : mixed
createEditPage()  : EditCPTPage
createManagePage()  : ManageCPTPage
getDefaultOrderby()  : mixed
registerTaxonomies()  : mixed
registerTaxonomy()  : mixed

Properties

$capability

protected string $capability = 'edit_post'

$editPage

protected EditCPTPage $editPage

$fieldGroups

protected array<string|int, MetaBoxGroup> $fieldGroups = array()

$managePage

protected ManageCPTPage $managePage

$postType

protected mixed $postType = 'mphb_room_attribute'

Methods

__construct()

public __construct() : mixed
Return values
mixed

addBackButton()

public addBackButton() : mixed
Return values
mixed

getCapabilityType()

Create an array of capability types depending on a post type name.

public getCapabilityType() : array<string|int, mixed>
Tags
since
4.0.0
Return values
array<string|int, mixed>

getEditPage()

public getEditPage() : EditCPTPage
Return values
EditCPTPage

getFieldGroups()

public getFieldGroups() : array<string|int, MetaBoxGroup>
Return values
array<string|int, MetaBoxGroup>

getManagePage()

public getManagePage() : ManageCPTPage
Return values
ManageCPTPage

getMenuSlug()

public getMenuSlug() : mixed
Return values
mixed

getPostType()

public getPostType() : mixed
Return values
mixed

handlePostUpdate()

Fired when new post created or updated.

public handlePostUpdate(array<string|int, mixed> $data, array<string|int, mixed> $postarr) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

An array of slashed post data

$postarr : array<string|int, mixed>

An array of sanitized, but otherwise unmodified post data.

Tags
see
https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data
global

\wpdb $wpdb

Return values
array<string|int, mixed>

Updated data array.

initEditPage()

public initEditPage() : mixed
Return values
mixed

initManagePage()

public initManagePage() : mixed
Return values
mixed

isCurrentEditPage()

public isCurrentEditPage() : mixed
Return values
mixed

maybeFlushRewriteRules()

public maybeFlushRewriteRules() : mixed
Return values
mixed

register()

public register() : mixed
Tags
since
4.0.0
  • Add custom capabilities.
Return values
mixed

registerImportingTaxonomy()

Import listener for default WordPress importer.

public registerImportingTaxonomy() : mixed
Return values
mixed

registerMetaBoxes()

public registerMetaBoxes() : mixed
Return values
mixed

registerOcdiTaxonomy()

Import listener for plugin One Click Demo Import. Fixes "[WARNING] Failed to import mphb_ra_..." warnings in content import.

public registerOcdiTaxonomy(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

The term data to import.

Return values
array<string|int, mixed>

The unchanged term data.

supportAttributesMenuOrder()

Add "menu_order" ordering to get_terms() (support a custom order in attributes).

public supportAttributesMenuOrder(array<string|int, mixed> $pieces, array<string|int, mixed> $taxonomies, array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$pieces : array<string|int, mixed>

Terms query SQL clauses.

$taxonomies : array<string|int, mixed>

An array of taxonomies.

$args : array<string|int, mixed>

An array of terms query arguments.

Tags
global

\wpdb $wpdb

Return values
array<string|int, mixed>

addActions()

protected addActions() : mixed
Return values
mixed

createEditPage()

protected createEditPage() : EditCPTPage
Return values
EditCPTPage

createManagePage()

protected createManagePage() : ManageCPTPage
Return values
ManageCPTPage

getDefaultOrderby()

private getDefaultOrderby() : mixed
Return values
mixed

registerTaxonomies()

private registerTaxonomies() : mixed
Return values
mixed

registerTaxonomy()

private registerTaxonomy(mixed $attributeName, mixed $attributeTitle, mixed $postId) : mixed
Parameters
$attributeName : mixed
$attributeTitle : mixed
$postId : mixed
Return values
mixed

Search results