Functions
ACPT exposes a complete set of php functions to manage custom post types and meta fields.
Use these tables for quick reference.
Settings
Custom post types | |||
---|---|---|---|
register_acpt_post_type | Close DescriptionRegister a new custom post type. Usageregister_acpt_post_type([
'post_name' => 'cpt',
'singular_label' => 'New CPT',
'plural_label' => 'New CPTs',
'icon' => 'admin-appearance',
'supports' => [
'title',
'editor',
'comments',
'revisions',
'trackbacks',
'author',
'excerpt',
],
'labels' => [],
'settings' => [],
]); Parameters
Return
| Register a new custom post type. | |
delete_acpt_post_type | Close DescriptionDelete a custom post type. Usagedelete_acpt_post_type('new-cpt', true); Parameters
Return
| Delete a custom post type. |
Option pages | |||
---|---|---|---|
register_acpt_option_page | Close DescriptionRegister a new option page. Usageregister_acpt_option_page([ 'menu_slug' => 'new-page', 'page_title' => 'New page', 'menu_title' => 'New page menu title', 'icon' => 'admin-appearance', 'capability' => 'manage_options', 'description' => 'lorem ipsum', 'position' => 77, ]) Parameters
Return
| Register a new option page. | |
delete_acpt_option_page | Close DescriptionUsagedelete_acpt_option_page('new-page') Parameters
Return
| Delete an option page. |
Taxonomies | |||
---|---|---|---|
register_acpt_taxonomy | Close DescriptionRegister a new custom taxonomy. Usageregister_acpt_taxonomy([
'slug' => 'new-tax',
'singular_label' => 'New Taxonomy',
'plural_label' => 'New Taxonomies',
'labels' => [],
'settings' => [],
'post_types' => [
'new-cpt'
]
]); Parameters
Return
| Register a new custom taxonomy. | |
delete_acpt_taxonomy | Close DescriptionDelete a custom post type. Usagedelete_acpt_taxonomy('new-tax'); Parameters
Return
| Delete a custom taxonomy. | |
assoc_acpt_taxonomy_to_acpt_post | Close DescriptionAssociate a custom taxonomy to a custom post type. Usageassoc_acpt_taxonomy_to_acpt_post('new-tax', 'page'); Parameters
Return
| Associate a custom taxonomy to a custom post type. | |
remove_assoc_acpt_taxonomy_from_acpt_post | Close DescriptionRemove association between a taxonomy to a post type. Usageremove_assoc_acpt_taxonomy_from_acpt_post('new-tax', 'page'); Parameters
Return
| Remove association between a taxonomy to a post type. |
Fields
CPT meta fields | |||
---|---|---|---|
add_acpt_meta_box | Close DescriptionAdd meta box settings to custom post type. Usageadd_acpt_meta_box('page','Box name'); Parameters
Return
| Add meta box settings to custom post type. | |
add_acpt_meta_field | Close DescriptionAdd meta box settings to custom post type. Usageadd_acpt_meta_field([
'post_type' => 'page',
'box_name' => 'New box',
'field_name' => 'Select name',
'field_type' => 'Select',
'show_in_archive' => false,
'required' => false,
'default_value' => "foo",
'description' => "lorem ipsum dolor facium",
'options' => [
[
'value' => 'foo',
'label' => 'Label foo',
],
[
'value' => 'bar',
'label' => 'Label bar',
],
[
'value' => 'fuzz',
'label' => 'Label fuzz',
],
]
]
); Parameters
Return
| Add meta field settings to custom post type. | |
delete_acpt_meta | Close DescriptionDelete all custom post type meta settings. Usagedelete_acpt_meta('page'); Parameters
Return
| Delete all custom post type meta settings. | |
delete_acpt_meta_box | Close DescriptionDelete ustom post type meta box settings. Usagedelete_acpt_meta_box('page', 'Box name'); Parameters
Return
| Delete ustom post type meta box settings. | |
delete_acpt_meta_field | Close DescriptionDelete custom post type meta field settings. Usagedelete_acpt_meta_field('page', 'Box name', 'Field name'); Parameters
Return
| Delete custom post type meta field settings. | |
edit_acpt_meta_box | Close DescriptionEdit custom post type meta box settings. Usageedit_acpt_meta_box('page', 'Box name', 'New Box name'); Parameters
Return
| Edit custom post type meta box settings. | |
edit_acpt_meta_field | Close DescriptionEdit custom post type meta field settings. Usageedit_acpt_meta_field([
'post_type' => 'page',
'box_name' => 'New box',
'old_field_name' => 'Field name',
'field_name' => 'Field name modified',
'field_type' => 'select',
'show_in_archive' => false,
'required' => false,
'options' => [
[
'value' => 'foo',
'label' => 'Label foo',
],
[
'value' => 'bar',
'label' => 'Label bar',
],
[
'value' => 'fuzz',
'label' => 'Label fuzz',
],
]
]); Parameters
Return
| Edit custom post type meta field settings. | |
get_acpt_meta_objects | Close DescriptionReturns the settings of all custom post type fields saved on a specific post. Usageget_acpt_meta_objects('page'); Parameters
Return
| Returns the settings of all custom post type fields saved on a specific post. | |
get_acpt_box_object | Close DescriptionReturns the settings of a specific custom post type meta box. Usageget_acpt_box_object('page', 'Box name'); Parameters
Return
| Returns the settings of a specific custom post type meta box. | |
get_acpt_field_object | Close DescriptionReturns the settings of a specific custom post type field. Usageget_acpt_field_object('page', 'Box name', 'Field name'); Parameters
Return
| Returns the settings of a specific custom post type field. |
Taxonomy meta fields | |||
---|---|---|---|
add_acpt_tax_meta_box | Close DescriptionAdd meta box settings to taxonomy. Usageadd_acpt_tax_meta_box('category', 'Box name'); Parameters
Return
| Add meta box settings to taxonomy. | |
add_acpt_tax_meta_field | Close DescriptionAdd meta box settings to taxonomy. Usageadd_acpt_tax_meta_field([
'taxonomy' => 'category',
'box_name' => 'New box',
'field_name' => 'advanced field',
'field_type' => 'text',
'required' => false,
'default_value' => "foo",
'description' => "lorem ipsum dolor facium",
'advanced_options' => [
[
'value' => '</p>',
'key' => 'after',
],
[
'value' => '<p>',
'key' => 'before',
],
[
'value' => '平仮名',
'key' => 'label',
],
]
]) Parameters
Return
| Add meta field settings to taxonomy. | |
delete_acpt_tax_meta | Close DescriptionDelete all taxonomy meta settings. Usagedelete_acpt_tax_meta('category'); Parameters
Return
| Delete all taxonomy meta settings. | |
delete_acpt_tax_meta_box | Close DescriptionDelete taxonomy meta box settings. Usagedelete_acpt_tax_meta_box('taxonomy', 'Box name'); Parameters
Return
| Delete taxonomy meta box settings. | |
delete_acpt_tax_meta_field | Close DescriptionDelete taxonomy meta field settings. Usagedelete_acpt_tax_meta_field('category', 'Box name', 'Field name'); Parameters
Return
| Delete taxonomy meta field settings. | |
edit_acpt_tax_meta_box | Close DescriptionEdit taxonomy meta box settings. Usageedit_acpt_tax_meta_box('category', 'Box name', 'New Box name'); Parameters
Return
| Edit taxonomy meta box settings. | |
edit_acpt_tax_meta_field | Close DescriptionEdit taxonomy meta field settings. Usageedit_acpt_tax_meta_field([
'taxonomy' => 'category',
'box_name' => 'New box',
'old_field_name' => 'Field name',
'field_name' => 'Field name modified',
'field_type' => 'select',
'required' => false,
'options' => [
[
'value' => 'foo',
'label' => 'Label foo',
],
[
'value' => 'bar',
'label' => 'Label bar',
],
[
'value' => 'fuzz',
'label' => 'Label fuzz',
],
]
]); Parameters
Return
| Edit taxonomy meta field settings. | |
get_acpt_tax_meta_objects | Close DescriptionReturns the settings of all taxonomy fields saved on a specific term. Usageget_acpt_tax_meta_objects('category'); Parameters
Return
| Returns the settings of all taxonomy fields saved on a specific term. | |
get_acpt_tax_box_object | Close DescriptionReturns the settings of a specific custom taxonomy box. Usageget_acpt_tax_box_object('category', 'Box name'); Parameters
Return
| Returns the settings of a specific custom taxonomy box. | |
get_acpt_tax_field_object | Close DescriptionReturns the settings of a specific taxonomy field. Usageget_acpt_tax_field_object('category', 'Box name', 'Field name'); Parameters
Return
| Returns the settings of a specific taxonomy field. |
Option page fields | |||
---|---|---|---|
add_acpt_option_page_meta_box | Close DescriptionAdd meta box settings to option page. Usageadd_acpt_option_page_meta_box('new-page','Box name'); Parameters
Return
| Add meta box settings to option page. | |
add_acpt_option_page_meta_field | Close DescriptionAdd meta box settings to option page. Usageadd_acpt_option_page_meta_field([
'option_page' => 'new-page',
'box_name' => 'New box',
'field_name' => 'advanced field',
'field_type' => 'text',
'required' => false,
'default_value' => "foo",
'description' => "lorem ipsum dolor facium",
'advanced_options' => [
[
'value' => '</p>',
'key' => 'after',
],
[
'value' => '<p>',
'key' => 'before',
],
[
'value' => '平仮名',
'key' => 'label',
],
]
]) Parameters
Return
| Add meta field settings to option page. | |
delete_acpt_option_page_meta_box | Close DescriptionDelete all option page meta box settings. Usagedelete_acpt_option_page_meta_box('new-page'); Parameters
Return
| Delete all option page meta box settings. | |
delete_acpt_option_page_meta_field | Close DescriptionDelete option page meta field settings. Usagedelete_acpt_option_page_meta_field('new-page', 'Box name', 'Field name'); Parameters
Return
| Delete option page meta field settings. | |
edit_acpt_option_page_meta_box | Close DescriptionEdit option page meta box settings. Usageedit_acpt_option_page_meta_box('new-page', 'Box name', 'New Box name'); Parameters
Return
| Edit option page meta box settings. | |
edit_acpt_option_page_meta_field | Close DescriptionEdit option page meta field settings. Usageedit_acpt_option_page_meta_field([
'option_page' => 'new-page',
'box_name' => 'New box',
'old_field_name' => 'Field name',
'field_name' => 'Field name modified',
'field_type' => 'select',
'required' => false,
'options' => [
[
'value' => 'foo',
'label' => 'Label foo',
],
[
'value' => 'bar',
'label' => 'Label bar',
],
[
'value' => 'fuzz',
'label' => 'Label fuzz',
],
]
]); Parameters
Return
| Edit option page meta field settings. | |
get_acpt_option_page_meta_objects | Close DescriptionReturns the settings of all option page fields saved on a specific page. Usageget_acpt_tax_meta_objects('new-page'); Parameters
Return
| Returns the settings of all option page fields saved on a specific page. | |
get_acpt_option_page_box_object | Close DescriptionReturns the settings of a specific option page box. Usageget_acpt_option_page_box_object('new-page', 'Box name'); Parameters
Return
| Returns the settings of a specific option page box. | |
get_acpt_option_page_field_object | Close DescriptionReturns the settings of a specific option page field. Usageget_acpt_option_page_field_object('new-page', 'Box name', 'Field name'); Parameters
Return
| Returns the settings of a specific option page field. |
User meta fields | |||
---|---|---|---|
add_acpt_user_meta_box | Close DescriptionAdd meta box settings to user. Usageadd_acpt_user_meta_box('Box name'); Parameters
Return
| Add meta box settings to user. | |
add_acpt_user_meta_field | Close DescriptionAdd meta field settings to user. Usageadd_acpt_user_meta_field([
'box_name' => 'New box',
'field_name' => 'Select name',
'field_type' => 'select',
'show_in_archive' => false,
'required' => false,
'default_value' => "foo",
'description' => "lorem ipsum dolor facium",
'options' => [
[
'value' => 'foo',
'label' => 'Label foo',
],
[
'value' => 'bar',
'label' => 'Label bar',
],
[
'value' => 'fuzz',
'label' => 'Label fuzz',
],
]
]); Parameters
Return
| Add meta field settings to user. | |
delete_acpt_user_meta | Close DescriptionDelete all user meta settings. Usagedelete_acpt_user_meta(); ParametersNone Return
| Delete all user meta settings. | |
delete_acpt_user_meta_box | Close DescriptionDelete user meta box settings. Usagedelete_acpt_user_meta_box('Box name'); Parameters
Return
| Delete user meta box settings. | |
delete_acpt_user_meta_field | Close DescriptionDelete user meta field settings. Usagedelete_acpt_user_meta_box('Box name', 'Field name'); Parameters
Return
| Delete user meta field settings. | |
edit_acpt_user_meta_box | Close DescriptionEdit user meta box settings. Usageedit_acpt_user_meta_box('Box name', 'New box name'); Parameters
Return
| Edit user meta box settings. | |
edit_acpt_user_meta_field | Close DescriptionEdit user meta box settings. Usageedit_acpt_user_meta_field([
'box_name' => 'New box modified',
'old_field_name' => 'Field name',
'field_name' => 'Field name modified',
'field_type' => 'select',
'show_in_archive' => false,
'required' => false,
'options' => [
[
'value' => 'foo',
'label' => 'Label foo',
],
[
'value' => 'bar',
'label' => 'Label bar',
],
[
'value' => 'fuzz',
'label' => 'Label fuzz',
],
]
]); Parameters
Return
| Edit user meta field settings. | |
get_acpt_user_meta_objects | Close DescriptionReturns the settings of all user fields saved on a specific user. Usageget_acpt_user_meta_objects(); ParametersNone Return
| Returns the settings of all user fields saved on a specific user. | |
get_acpt_user_box_object | Close DescriptionReturns the settings of a specific custom user box. Usageget_acpt_user_box_object('Box name'); Parameters
Return
| Returns the settings of a specific custom user box. | |
get_acpt_user_field_object | Close DescriptionReturns the settings of a specific user field. Usageget_acpt_user_field_object('Box name', 'Field name'); Parameters
Return
| Returns the settings of a specific user field. |
Values
Save CPT meta field values | |||
---|---|---|---|
add_acpt_meta_field_value | Close DescriptionAdd custom post type meta field value. Usageadd_acpt_meta_field_value([
'post_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#676767",
]); Parameters
Return
| Add custom post type meta field value. | |
add_acpt_meta_block_field_row_value | Close DescriptionAdd meta field settings to a custom post type Flexible field. Usageadd_acpt_meta_block_field_row_value([
'post_id' => 23,
'box_name' => 'box_name',
'field_name' => 'field_name',
'block_name' => 'block_name',
'block_index' => 0,
'value' => [
'field-name' => 'Your value'
]
]); Parameters
Return
| Add meta field settings to a custom post type Flexible field. | |
delete_acpt_meta_field_value | Close DescriptionDelete custom post type meta field value. Usagedelete_acpt_meta_field_value([
'post_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Color field',
]); Parameters
Return
| Delete custom post type meta field value. | |
delete_acpt_meta_block_field_row_value | Close DescriptionDelete meta field settings for a specific custom post type Flexible field. Usagedelete_acpt_meta_block_field_row_value([
'post_id' => 23,
'box_name' => 'box_name',
'field_name' => 'field_name',
'block_name' => 'block_name',
'block_index' => 0,
]); Parameters
Return
| Delete meta field settings for a specific custom post type Flexible field. | |
edit_acpt_meta_block_field_row_value | Close DescriptionEdit meta field settings for a specific custom post type Flexible field. Usageedit_acpt_meta_block_field_row_value([
'post_id' => 23,
'box_name' => 'box_name',
'field_name' => 'field_name',
'block_name' => 'block_name',
'block_index' => 0,
'value' => [
'field-name' => 'Your value'
]
]); Parameters
Return
| Edit meta field settings for a specific custom post type Flexible field. | |
edit_acpt_meta_field_value | Close DescriptionEdit custom post type meta field value. Usageedit_acpt_meta_field_value([
'post_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#444444",
]); Parameters
Return
| Edit custom post type meta field value. | |
add_acpt_meta_field_row_value | Close DescriptionAdd custom post type meta field row value (only for Repeater and List). Usageadd_acpt_meta_field_row_value([
'post_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Field name',
'value' => 'bar',
]); Parameters
Return
| Add custom post type meta field row value (only for Repeater and List). | |
delete_acpt_meta_field_row_value | Close DescriptionDelete custom post type meta field row value (only for Repeater and List). Usagedelete_acpt_meta_field_row_value([
'post_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
]); Parameters
Return
| Delete custom post type meta field row value (only for Repeater and List). | |
edit_acpt_meta_field_row_value | Close DescriptionEdit custom post type meta field row value (only for Repeater and List). Usageedit_acpt_meta_field_row_value([
'post_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
'value' => 'bar',
]); Parameters
Return
| Edit custom post type meta field row value (only for Repeater and List). |
Retrieve CPT meta field values | |||
---|---|---|---|
get_acpt_fields | Close DescriptionReturns an array of field values (name => value) for a specific post/box. Usageget_acpt_fields([
'post_id' => 32,
'box_name' => 'Box name',
]); Parameters
Return
| Returns an array of field values (name => value) for a specific post/box. | |
get_acpt_field_row_object | Close DescriptionReturns the settings of a specific sub field (only for Repeater). Usageget_acpt_field_row_object('page', 'New box', 'Repeater', 'Text'); Parameters
Return
| Returns the settings of a specific sub field (only for Repeater). | |
acpt_field_has_rows | Close DescriptionUsed to loop through a parent field's value (only for Repeater and List). Usageacpt_field_has_rows([
'post_id' => 233,
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Used to loop through a parent field's value (only for Repeater and List). | |
get_acpt_field | Close DescriptionReturns the value of a specific field. Usageget_acpt_field([
'post_id' => 233,
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Returns the value of a specific field. | |
acpt_field | Close DescriptionDisplays the value of a specific field. Usageacpt_field([
'post_id' => 233,
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Displays the value of a specific field. | |
acpt_block_child_field | Close DescriptionDisplays a field value nested in a Flexible block. Usageacpt_block_child_field([
'post_id' => 23,
'box_name' => 'New box',
'field_name' => 'Field name',
'parent_field_name' => 'Flexible field name',
'index' => 0,
'block_name' => 'block_name',
'block_index' => 0
]); Parameters
Return
| Displays a field value nested in a Flexible block. | |
acpt_field_has_blocks | Close DescriptionChecks if a field value contains any block. Usageacpt_field_has_blocks([
'post_id' => 23,
'box_name' => 'New box',
'field_name' => 'Field name' ]
]); Parameters
Return
| Checks if a field value contains any block. | |
get_acpt_block_child_field | Close DescriptionGet a Flexible field value. Usageget_acpt_block_child_field([
'post_id' => 23,
'box_name' => 'New box',
'field_name' => 'Field name',
'parent_field_name' => 'Flexible field name',
'index' => 0,
'block_name' => 'block_name',
'block_index' => 0
]); Parameters
Return
| Get a field value nested in a Flexible block. | |
is_acpt_field_visible | Close DescriptionChecks if a field value is visible or not. Usageis_acpt_field_visible([
'post_id' => 23,
'box_name' => 'New box',
'field_name' => 'Field name' ]
]); Parameters
Return
| Get a field value nested in a Flexible block. |
Save Option page meta field values | |||
---|---|---|---|
add_acpt_option_page_meta_field_value | Close DescriptionAdd option page meta field value. Usageadd_acpt_option_page_meta_field_value([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#676767",
]); Parameters
Return
| Add option page meta field value. | |
add_acpt_option_page_meta_block_field_row_value | Close DescriptionAdd meta field settings to a Flexible field. Usageadd_acpt_option_page_meta_block_field_row_value([
'option_page' => 'new-page',
'box_name' => 'box_name',
'field_name' => 'field_name',
'block_name' => 'block_name',
'block_index' => 0,
'value' => [
'field-name' => 'Your value'
]
]); Parameters
Return
| Add meta field settings to a field. | |
delete_acpt_option_page_meta_field_value | Close DescriptionDelete option page meta field value. Usagedelete_acpt_option_page_meta_field_value([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Color field',
]); Parameters
Return
| Delete option page meta field value. | |
delete_acpt_option_page_meta_block_field_row_value | Close DescriptionDelete meta field settings for a specific Flexible field. Usagedelete_acpt_option_page_meta_block_field_row_value([
'option_page' => 'new-page',
'box_name' => 'box_name',
'field_name' => 'field_name',
'block_name' => 'block_name',
'block_index' => 0,
]); Parameters
Return
| Delete meta field settings for a specific Flexible field. | |
edit_acpt_option_page_meta_block_field_row_value | Close DescriptionEdit meta field settings for a specific Flexible field. Usageedit_acpt_option_page_meta_block_field_row_value([
'option_page' => 'new-page',
'box_name' => 'box_name',
'field_name' => 'field_name',
'block_name' => 'block_name',
'block_index' => 0,
'value' => [
'field-name' => 'Your value'
]
]); Parameters
Return
| Edit meta field settings for a specific Flexible field. | |
edit_acpt_option_page_meta_field_value | Close DescriptionEdit option page meta field value. Usageedit_acpt_option_page_meta_field_value([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#444444",
]); Parameters
Return
| Edit option page meta field value. | |
add_acpt_option_page_meta_field_row_value | Close DescriptionAdd option page meta field row value (only for Repeater and List). Usageadd_acpt_option_page_meta_field_row_value([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Field name',
'value' => 'bar',
]); Parameters
Return
| Add option page meta field row value (only for Repeater and List). | |
delete_acpt_option_page_meta_field_row_value | Close DescriptionDelete option page meta field row value (only for Repeater and List). Usagedelete_acpt_option_page_meta_field_row_value([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
]); Parameters
Return
| Delete option page meta field row value (only for Repeater and List). | |
edit_acpt_option_page_meta_field_row_value | Close DescriptionEdit option page meta field row value (only for Repeater and List). Usageedit_acpt_option_page_meta_field_row_value([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
'value' => 'bar',
]); Parameters
Return
| Edit option page meta field row value (only for Repeater and List). |
Retrieve Option page meta field values | |||
---|---|---|---|
get_acpt_option_page_fields | Close DescriptionReturns an array of option page field values (name => value) for a specific post/box. Usageget_acpt_option_page_fields([
'option_page' => 'new-page',
'box_name' => 'Box name',
]); Parameters
Return
| Returns an array of option page field values (name => value) for a specific post/box. | |
get_acpt_option_page_field_row_object | Close DescriptionReturns the settings of a specific option page sub field (only for Repeater). Usageget_acpt_option_page_field_row_object('new-page', 'New box', 'Repeater', 'Text'); Parameters
Return
| Returns the settings of a specific option page sub field (only for Repeater). | |
acpt_field_option_page_has_rows | Close DescriptionUsed to loop through a parent option page field's value (only for Repeater and List). Usageacpt_field_option_page_has_rows([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Used to loop through a parent option page field's value (only for Repeater and List). | |
get_option_page_field | Close DescriptionReturns the value of a specific option page field. Usageget_option_page_field([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Returns the value of a specific option page field. | |
acpt_option_page_field | Close DescriptionDisplays the value of a specific option page field. Usageacpt_option_page_field([
'option_page' => 'new-page',
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Displays the value of a specific option page field. | |
acpt_option_page_block_child_field | Close DescriptionDisplays a field value nested in a Flexible block. Usageacpt_option_page_block_child_field([
'option_page' => 'new-page',
'box_name' => 'New box',
'field_name' => 'Field name',
'parent_field_name' => 'Flexible field name',
'index' => 0,
'block_name' => 'block_name',
'block_index' => 0
]); Parameters
Return
| Displays a field value nested in a Flexible block. | |
acpt_option_page_field_has_blocks | Close DescriptionChecks if a field value contains any block. Usageacpt_option_page_field_has_blocks([
'option_page' => 'new-page',
'box_name' => 'New box',
'field_name' => 'Field name' ]
]); Parameters
Return
| Checks if a field value contains any block. | |
get_acpt_option_page_block_child_field | Close DescriptionGet a Flexible field value. Usageget_acpt_option_page_block_child_field([
'option_page' => 'new-page',
'box_name' => 'New box',
'field_name' => 'Field name',
'parent_field_name' => 'Flexible field name',
'index' => 0,
'block_name' => 'block_name',
'block_index' => 0
]); Parameters
Return
| Get a field value nested in a Flexible block. | |
is_acpt_option_page_field_visible | Close DescriptionChecks if a field value is visible or not. Usageis_acpt_option_page_field_visible([
'option_page' => 'new-page',
'box_name' => 'New box',
'field_name' => 'Field name' ]
]); Parameters
Return
| Get a field value nested in a Flexible block. |
Save taxonomy meta field values | |||
---|---|---|---|
add_acpt_tax_meta_field_value | Close DescriptionAdd taxonomy meta field value. Usageadd_acpt_tax_meta_field_value([
'term_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#676767",
]); Parameters
Return
| Add taxonomy meta field value. | |
delete_acpt_tax_meta_field_value | Close DescriptionDelete taxonomy meta field value. Usagedelete_acpt_tax_meta_field_value([
'term_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Color field',
]); Parameters
Return
| Delete taxonomy meta field value. | |
edit_acpt_tax_meta_field_value | Close DescriptionEdit taxonomy meta field value. Usageedit_acpt_tax_meta_field_value([
'term_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#444444",
]); Parameters
Return
| Edit taxonomy meta field value. | |
add_acpt_tax_meta_field_row_value | Close DescriptionAdd taxonomy meta field row value (only for Repeater and List). Usageadd_acpt_tax_meta_field_row_value([
'term_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Field name',
'value' => 'bar',
]); Parameters
Return
| Add taxonomy meta field row value (only for Repeater and List). | |
delete_acpt_tax_meta_field_row_value | Close DescriptionDelete taxonomy meta field row value (only for List). Usagedelete_acpt_tax_meta_field_row_value([
'term_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
]); Parameters
Return
| Delete taxonomy meta field row value (only for List). | |
edit_acpt_tax_meta_field_row_value | Close DescriptionEdit taxonomy meta field row value (only for List). Usageedit_acpt_tax_meta_field_row_value([
'term_id' => 32,
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
'value' => 'bar',
]); Parameters
Return
| Edit taxonomy meta field row value (only for List). |
Retrieve taxonomy meta field values | |||
---|---|---|---|
get_acpt_tax_fields | Close DescriptionReturns an array of field values (name => value) for a specific term/box. Usageget_acpt_tax_fields([
'term_id' => 32,
'box_name' => 'Box name',
]); Parameters
Return
| Returns an array of field values (name => value) for a specific term/box. | |
acpt_tax_field_has_rows | Close DescriptionUsed to loop through a parent field's value (only for List). Usageacpt_tax_field_has_rows([
'term_id' => 33,
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Used to loop through a parent field's value (only for List). | |
get_acpt_tax_field | Close DescriptionReturns the value of a specific field. Usageget_acpt_tax_field([
'term_id' => 233,
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Returns the value of a specific field. | |
acpt_tax_field | Close DescriptionDisplays the value of a specific field. Usageacpt_tax_field([
'term_id' => 233,
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Displays the value of a specific field. | |
is_acpt_tax_field_visible | Close DescriptionChecks if a taxonomy field value is visible or not. Usageis_acpt_tax_field_visible([
'term_id' => 23,
'box_name' => 'New box',
'field_name' => 'Field name' ]
]); Parameters
Return
| Checks if a taxonomy field value is visible or not. |
Save user meta field values | |||
---|---|---|---|
add_acpt_user_meta_field_value | Close DescriptionAdd user meta field value. Usageadd_acpt_user_meta_field_value([
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#676767",
]); Parameters
Return
| Add user meta field value. | |
delete_acpt_user_meta_field_value | Close DescriptionDelete user meta field value. Usagedelete_acpt_user_meta_field_value([
'box_name' => 'Box name',
'field_name' => 'Color field',
]); Parameters
Return
| Delete user meta field value. | |
edit_acpt_user_meta_field_value | Close DescriptionEdit user field value. Usageedit_acpt_user_meta_field_value([
'box_name' => 'Box name',
'field_name' => 'Color field',
'value' => "#444444",
]); Parameters
Return
| Edit user meta field value. | |
add_acpt_user_meta_field_row_value | Close DescriptionAdd user meta field row value (only for List). Usageadd_acpt_user_meta_field_row_value([
'box_name' => 'Box name',
'field_name' => 'Field name',
'value' => 'bar',
]); Parameters
Return
| Add user meta field row value (only for List). | |
delete_acpt_user_meta_field_row_value | Close DescriptionDelete user meta field row value (only for List). Usagedelete_acpt_user_meta_field_row_value([
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
]); Parameters
Return
| Delete user meta field row value (only for Repeater and List). | |
edit_acpt_user_meta_field_row_value | Close DescriptionEdit user field row value (only for List). Usageedit_acpt_user_meta_field_row_value([
'box_name' => 'Box name',
'field_name' => 'Field name',
'index' => 0,
'value' => 'bar',
]); Parameters
Return
| Edit user meta field row value (only for Repeater and List). |
Retrieve user meta field values | |||
---|---|---|---|
get_acpt_user_fields | Close DescriptionReturns an array of field values (name => value) for a specific term/box. Usageget_acpt_user_fields([
'box_name' => 'Box name',
]); Parameters
Return
| Returns an array of field values (name => value) for a specific term/box. | |
acpt_user_field_has_rows | Close DescriptionUsed to loop through a parent field's value (only for List). Usageacpt_user_field_has_rows([
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Used to loop through a parent field's value (only for List). | |
get_acpt_user_field | Close DescriptionReturns the value of a specific field. Usageget_acpt_user_field([
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Returns the value of a specific field. | |
acpt_user_field | Close DescriptionDisplays the value of a specific field. Usageacpt_user_field([
'box_name' => 'Box name',
'field_name' => 'Field name',
]); Parameters
Return
| Displays the value of a specific field. |