Disciple_Tools_Contact_Post_Type

Class Disciple_Tools_Contact_Post_Type Disciple_Tools Plugin Contacts Post Type Class All functionality pertaining to contacts post types in Disciple_Tools.

package

Disciple_Tools\Posts\Contacts

category

Plugin

author

Chasm.Solutions & Kingdom.Training

since 0.1.0

Methods

Disciple_Tools_Contact_Post_Type constructor.

__construct(string $post_type = 'contacts', string $singular = '', string $plural = '', array $args = array(), array $taxonomies = array()) 

Arguments

$post_type

string

$singular

string

$plural

string

$args

array

$taxonomies

array

Run on activation.

activation() 
access

public

since 0.1.0

Field: Contact Fields

contact_fields(\int $post_id) : array

Arguments

$post_id

\int

Response

array

contacts_rewrites_init

contacts_rewrites_init() 

Helper function to create the unique metakey for contacts channels.

create_channel_metakey( $channel_key,  $field_type) : string

Arguments

$channel_key

$field_type

Response

string

dt_get_custom_channels_translation

dt_get_custom_channels_translation( $channel_list) 

Arguments

$channel_list

dt_get_custom_fields_translation

dt_get_custom_fields_translation( $fields,  $post_type) 

Arguments

$fields

$post_type

Flush the rewrite rules

flush_rewrite_rules() 
access

public

since 0.1.0

Get a list of the contact channels and their types

get_channels_list() : mixed
access

public

since 0.1.0

Response

mixed

get_contact_field_defaults

get_contact_field_defaults( $post_id = null,  $include_current_post = null) 

Arguments

$post_id

$include_current_post

Get the settings for the custom fields.

get_custom_fields_settings(boolean $include_current_post = true, integer|null $post_id = null, boolean $with_deleted_options = false, boolean $load_from_cache = true) : mixed

Arguments

$include_current_post

boolean

$post_id

integer|null

$with_deleted_options

boolean

$load_from_cache

boolean

Response

mixed

get_post_type_settings_hook

get_post_type_settings_hook( $settings,  $post_type) 

Arguments

$settings

$post_type

get_type_name_plural

get_type_name_plural() 
static

get_type_name_singular

get_type_name_singular() 
static

Main Disciple_Tools_Contact_Post_Type Instance Ensures only one instance of Disciple_Tools_Contact_Post_Type is loaded or can be loaded.

instance() : \Disciple_Tools_Contact_Post_Type
static
since 0.1.0
static

Response

\Disciple_Tools_Contact_Post_Type

instance

Register the post type.

register_post_type() : void
access

public

Create a unique hash for the key.

unique_hash() : boolean|string

Response

boolean|string

Properties

The post type token.

post_type : string
access

public

since
var

Type(s)

string

The post type singular label.

singular : string
access

public

since
var

Type(s)

string

The post type plural label.

plural : string
access

public

since
var

Type(s)

string

search_items

search_items : 

Type(s)

The post type args.

args : array
access

public

since
var

Type(s)

array

The taxonomies for this post type.

taxonomies : array
access

public

since
var

Type(s)

array

Disciple_Tools_Admin_Menus The single instance of Disciple_Tools_Admin_Menus.

_instance : object
static
var
access

private

since

Type(s)

object