PHP Class Admin_Apple_Meta_Boxes, apple-news

Since: 0.9.0
Inheritance: extends Apple_News
ファイルを表示 Open project: alleyinteractive/apple-news Class Usage Examples

Public Methods

Method Description
__construct ( $settings = null ) Constructor.
add_meta_boxes ( WP_Post $post ) Add the Apple News meta boxes
build_sections_field ( array $sections, integer $post_id ) Builds the sections dropdown
do_publish ( integer $post_id, WP_Post $post ) Check for a publish action from the meta box.
publish_meta_box ( WP_Post $post ) Add the Apple News publish meta box
register_assets ( string $hook ) Registers assets used by meta boxes.
save_post_meta ( integer $post_id ) Saves the Apple News meta fields associated with a post
section_is_checked ( array $sections, integer $section_id, integer $is_default ) Determine if a section is checked

Method Details

__construct() public method

Constructor.
public __construct ( $settings = null )

add_meta_boxes() public method

Add the Apple News meta boxes
Since: 0.9.0
public add_meta_boxes ( WP_Post $post )
$post WP_Post

build_sections_field() public static method

Builds the sections dropdown
public static build_sections_field ( array $sections, integer $post_id )
$sections array
$post_id integer

do_publish() public method

Check for a publish action from the meta box.
Since: 0.9.0
public do_publish ( integer $post_id, WP_Post $post )
$post_id integer
$post WP_Post

publish_meta_box() public method

Add the Apple News publish meta box
Since: 0.9.0
public publish_meta_box ( WP_Post $post )
$post WP_Post

register_assets() public method

Registers assets used by meta boxes.
public register_assets ( string $hook )
$hook string

save_post_meta() public static method

Saves the Apple News meta fields associated with a post
public static save_post_meta ( integer $post_id )
$post_id integer

section_is_checked() public static method

Determine if a section is checked
public static section_is_checked ( array $sections, integer $section_id, integer $is_default )
$sections array
$section_id integer
$is_default integer