\MainWP\DashboardMainWP_Post_Page_Handler

Class MainWP_Post_Page_Handler

Summary

Methods
Properties
Constants
get_class_name()
add_meta()
ajax_add_meta()
get_categories()
posting()
get_post()
new_post()
create_post()
upload_image()
add_sticky_handle()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_class_name()

get_class_name() : string

Get Class Name

Returns

string —

CLASS

add_meta()

add_meta(integer  $post_ID) : mixed

Method add_meta()

Add post meta data defined in $_POST superglobal for post with given ID.

Parameters

integer $post_ID

Post or Page ID.

Returns

mixed —

False or add_post_meta()

ajax_add_meta()

ajax_add_meta() 

Method ajax_add_meta()

Ajax process to add post meta data.

new_post()

new_post(array  $post_data = array()) : array

Method new_post()

Create new post.

Parameters

array $post_data

Array of post data.

Returns

array —

result

create_post()

create_post(mixed  $new_post, mixed  $post_custom, mixed  $post_category, mixed  $post_featured_image, mixed  $upload_dir, mixed  $post_tags, mixed  $post_gallery_images) : array

Method create_post()

Create post.

Parameters

mixed $new_post

Post type.

mixed $post_custom

Custom Post.

mixed $post_category

Post Category.

mixed $post_featured_image

Post Featured Image.

mixed $upload_dir

Child Site upload directory.

mixed $post_tags

Post tags.

mixed $post_gallery_images

Post Gallery Images.

Returns

array —

result

upload_image()

upload_image(string  $img_url, array  $img_data = array()) : mixed

Method upload_image()

Handle upload image.

Parameters

string $img_url

URL for the image.

array $img_data

Array of image data.

Throws

\Exception

Error upload file.

Returns

mixed —

array of result or null.

add_sticky_handle()

add_sticky_handle(mixed  $post_id) : integer

Method add_sticky_handle()

Add post meta.

Parameters

mixed $post_id

Post ID.

Returns

integer —

$post_id Post ID.