static
void
activate_post_type
( $type)
inserts a new post status into the database, if it doesn't exist
static
none
add_new_status
(string $status, [bool $internal = false])
-
string
$status: The name of the new post status
-
bool
$internal: Whether this status is for internal use only. If true, this status will NOT be presented to the user
inserts a new post type into the database, if it doesn't exist
static
none
add_new_type
(string $type, [bool $active = true])
-
string
$type: The name of the new post type
-
bool
$active: Whether the new post type is active or not
Create a post and save it.
static
Post
create
(
array $paramarray)
-
array
$paramarray: An associative array of post fields
static
void
deactivate_post_type
( $type)
Return the defined database columns for a Post.
static
array
default_fields
()
Return a single requested post.
$post=
Post::get( array( 'slug' =>
'wooga' ) );
static
Post
get
([
array $paramarray =
array()])
-
array
$paramarray: An associated array of parameters, or a querystring
returns an associative array of active post types
static
array
list_active_post_types
([bool $refresh = false])
-
bool
$refresh: whether to force a refresh of the cached values
returns an associative array of all post types
static
array
list_all_post_types
([bool $refresh = false])
-
bool
$refresh: whether to force a refresh of the cached values
returns an associative array of post statuses
static
array
list_post_statuses
([bool $all = true], [ $refresh = false])
-
bool
$all: whether to force a refresh of the cached values
-
$refresh
returns the interger value of the specified post status, or false
static
mixed
status
(mixed $name)
-
mixed
$name: a post status name or value
returns the friendly name of a post status, or null
static
mixed
status_name
(mixed $status)
-
mixed
$status: a post status value, or name
returns the integer value of the specified post type, or false
static
mixed
type
(mixed $name)
-
mixed
$name: a post type name or number
returns the friendly name of a post type, or null
static
mixed
type_name
(mixed $type)
-
mixed
$type: a post type number, or name
Constructor for the Post class.
Post
__construct
([array $paramarray = array()])
-
array
$paramarray: an associative array of initial Post field values.
Redefinition of:
- QueryRecord::__construct()
- constructor __construct Constructor for the QueryRecord class.
Add a permission to a post
void
add_permission
(string $permission)
-
string
$permission: The name of the permission to add
Returns the ascending post, relative to this post, according to params
Post
ascend
([
$params =
null])
Return the content type of this object
string
content_type
()
Implementation of:
- IsContent::content_type()
- Returns the content type of the object instance
Creates default permissions on a post
void
create_default_permissions
()
function delete
Deletes an existing post
void
delete
()
Redefinition of:
- QueryRecord::delete()
- This is the public interface that deletes a record
Deletes permissions on a post
void
delete_permissions
()
Returns the descending post, relative to this post, according to params
Post
descend
([
$params =
null])
Returns a set of properties used by URL::get to create URLs
array
get_url_args
()
Redefinition of:
- QueryRecord::get_url_args()
- Returns an array with the current field settings
function insert
Saves a new post to the posts table
void
insert
()
Redefinition of:
- QueryRecord::insert()
- This is the public interface that inserts a record
function publish
Updates an existing post to published status
boolean
publish
()
function update
Updates an existing post in the posts table
void
update
([bool $minor = true])
-
bool
$minor: Indicates if this is a major or minor update
Redefinition of:
- QueryRecord::update()
- This is the public interface that updates a record
Handle calls to this Post object that are implemented by plugins
mixed
__call
(string $name, array $args)
-
string
$name: The name of the function called
-
array
$args: Arguments passed to the function call
function __get
Overrides QueryRecord __get to implement custom object properties
mixed
__get
(string $name)
-
string
$name: Name of property to return
Redefinition of:
- QueryRecord::__get()
- function __get
function __set
Overrides QueryRecord __get to implement custom object properties
mixed
__set
(string $name, $value)
-
string
$name: Name of property to return
-
$value
Redefinition of:
- QueryRecord::__set()
- function __set
Inherited Methods
Inherited From QueryRecord
QueryRecord::__construct()
QueryRecord::delete()
QueryRecord::deleteRecord()
QueryRecord::exclude_fields()
QueryRecord::get_url_args()
QueryRecord::insert()
QueryRecord::insertRecord()
QueryRecord::list_excluded_fields()
QueryRecord::to_array()
QueryRecord::update()
QueryRecord::updateRecord()
QueryRecord::__get()
QueryRecord::__isset()
QueryRecord::__set()