1 | <?php |
||
8 | class Widget_Container extends Container { |
||
9 | |||
10 | /** |
||
11 | * Create a new widget |
||
12 | * |
||
13 | * @param string $unique_id Unique ID of the widget |
||
14 | * @param string $title Ignored |
||
15 | * @param string $type Container type |
||
16 | **/ |
||
17 | public function __construct( $unique_id, $title, $type ) { |
||
22 | |||
23 | /** |
||
24 | * Perform instance initialization |
||
25 | **/ |
||
26 | public function init() { |
||
32 | |||
33 | /** |
||
34 | * Perform checks whether the container should be attached during the current request |
||
35 | * |
||
36 | * @return bool True if the container is allowed to be attached |
||
37 | **/ |
||
38 | public function is_valid_attach_for_request() { |
||
45 | |||
46 | /** |
||
47 | * Check container attachment rules against object id |
||
48 | * |
||
49 | * @return bool |
||
50 | **/ |
||
51 | public function is_valid_attach_for_object( $object_id = null ) { |
||
54 | |||
55 | /** |
||
56 | * Output the container markup |
||
57 | **/ |
||
58 | public function render() { |
||
61 | |||
62 | /** |
||
63 | * Returns an array that holds the container data, suitable for JSON representation. |
||
64 | * This data will be available in the Underscore template and the Backbone Model. |
||
65 | * |
||
66 | * @param bool $load Should the value be loaded from the database or use the value from the current instance. |
||
67 | * @return array |
||
68 | */ |
||
69 | public function to_json( $load ) { |
||
72 | } |
||
73 | |||
74 |