\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_bulk()
posting()
posting_prepare()
ajax_posting_posts()
ajax_get_sites_of_groups()
posting_posts()
get_post()
new_post()
create_post()
replace_advanced_image()
upload_image()
add_sticky_handle()
add_status_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.

posting_bulk()

posting_bulk() 

Method posting_bulk()

Create bulk posts on sites.

posting_prepare()

posting_prepare(integer  $post_id) 

Method posting_prepare()

Posting posts.

Parameters

integer $post_id

Post or Page ID.

ajax_posting_posts()

ajax_posting_posts() 

Method ajax_posting_posts()

Ajax Posting posts.

ajax_get_sites_of_groups()

ajax_get_sites_of_groups() 

Method ajax_get_sites_of_groups()

Ajax Get sites of groups.

posting_posts()

posting_posts(integer  $post_id, string  $what) 

Method posting_posts()

Posting posts.

Parameters

integer $post_id

Post or Page ID.

string $what

What posting process.

new_post()

new_post(array  $post_data = array(), boolean  $replaceadvImg = false, mixed  $website = false) : array

Method new_post()

Create new post.

Parameters

array $post_data

Array of post data.

boolean $replaceadvImg

replace advanced images of post or not.

mixed $website

The website object.

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, boolean  $replaceadvImg = false, mixed  $website = false) : 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.

boolean $replaceadvImg

replace advanced images of post or not.

mixed $website

The website object.

Returns

array —

result

replace_advanced_image()

replace_advanced_image(array  $content, array  $upload_dir, mixed  $website, boolean  $withslashes = false) : mixed

Method replace_advanced_image()

Handle upload advanced image.

Parameters

array $content

post content data.

array $upload_dir

upload directory info.

mixed $website

The website.

boolean $withslashes

to use preg pattern with slashes.

Returns

mixed —

array of 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.

add_status_handle()

add_status_handle(integer  $post_id) : integer

Method add_status_handle()

Add edit post status handle.

Parameters

integer $post_id

Post ID.

Returns

integer —

$post_id Post id with status handle added to it.