-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass-wppf-test-post-edit-screen-meta-box.php
More file actions
executable file
·66 lines (54 loc) · 1.69 KB
/
Copy pathclass-wppf-test-post-edit-screen-meta-box.php
File metadata and controls
executable file
·66 lines (54 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* WPPF Test Plugin
*
* Copyright (c) 2008–2026 DesignInk, LLC
* Copyright (c) 2026 Kyle Niemiec
*
* This file is licensed under the GNU General Public License v3.0.
* See the LICENSE file for details.
*/
defined( 'ABSPATH' ) or exit;
use WPPF\v1_2_3\WordPress\Admin\Meta_Box;
if ( ! class_exists( 'WPPF_Test_Post_Edit_Screen_Meta_Box', false ) ) {
/**
* The primary Meta Box for the Post Series Post Type page.
*/
final class WPPF_Test_Post_Edit_Screen_Meta_Box extends Meta_Box {
/** @var string Set context to advanced. */
public $context = 'side';
/**
* The required meta_key() abstract function.
*
* @return string The meta key to use for nonces and inputs in the Meta Box.
*/
final public static function meta_key() { return 'edit_screen_test_meta_box'; }
/**
* The required get_title() abstract function.
*
* @return string The title of the Meta Box.
*/
final public static function get_title() { return 'Edit Screen Meta Box'; }
/**
* The required get_id() abstract function.
*
* @return string The ID for the Meta Box.
*/
final public static function get_id() { return WPPF_Test_Post_Type::post_type(); }
/**
* The required render() abstract function.
*/
final protected static function render() {
WPPF_Test_Plugin::instance()->get_admin_module()->get_template( 'edit-screen-test-meta-box' );
}
/**
* The inherited abstract function to attach to the 'save_post' hook.
*
* @param int $post_id The Post ID.
* @param \WP_Post $Post The Post object.
*
* @return int The post ID.
*/
final protected static function save_post( int $post_id, ?\WP_Post $Post = null ) { return $post_id; }
}
}