1 | <?php |
||
20 | class AdminPageFramework_Property_widget extends AdminPageFramework_Property_Base { |
||
21 | |||
22 | /** |
||
23 | * Defines the property type. |
||
24 | * @remark Setting the property type helps to check whether some components are loaded such as scripts that can be reused per a class type basis. |
||
25 | * @since 3.2.0 |
||
26 | * @internal |
||
27 | */ |
||
28 | public $_sPropertyType = 'widget'; |
||
29 | |||
30 | /** |
||
31 | * Indicates the fields type. |
||
32 | * |
||
33 | * @since 3.2.0 |
||
34 | * @internal |
||
35 | */ |
||
36 | public $sStructureType = 'widget'; |
||
37 | |||
38 | /** |
||
39 | * Stores the extended instantiated class name. |
||
40 | * |
||
41 | * @since 3.2.0 |
||
42 | * @var string |
||
43 | * @access public |
||
44 | */ |
||
45 | public $sClassName = ''; |
||
46 | |||
47 | /** |
||
48 | * Stores the caller script path. |
||
49 | * |
||
50 | * @since 3.2.0 |
||
51 | * @var string |
||
52 | * @access public |
||
53 | */ |
||
54 | public $sCallerPath = ''; |
||
55 | |||
56 | /** |
||
57 | * Stores the widget title. |
||
58 | * |
||
59 | * @since 3.2.0 |
||
60 | * @todo 3.7.10 Now the base property supports $sTitle property so maybe use that and deprecated this item. |
||
61 | */ |
||
62 | public $sWidgetTitle = ''; |
||
63 | |||
64 | /** |
||
65 | * Stores the widget arguments. |
||
66 | * |
||
67 | * Structure: |
||
68 | * array( |
||
69 | * 'classname' => '...', |
||
70 | * 'description' => __( '...', '...' ), |
||
71 | * ) |
||
72 | * |
||
73 | * @since 3.2.0 |
||
74 | */ |
||
75 | public $aWidgetArguments = array(); |
||
76 | |||
77 | /** |
||
78 | * Determines whether the widget title should be displayed in the front end. |
||
79 | * |
||
80 | * By default when the 'title' field ID exists and has a value, the framework displays the title. |
||
81 | * This property value can disable this behaviour by setting it to false. |
||
82 | * |
||
83 | * @since 3.5.7 |
||
84 | */ |
||
85 | public $bShowWidgetTitle = true; |
||
86 | |||
87 | /** |
||
88 | * Stores the widget object. |
||
89 | * |
||
90 | * @since 3.5.9 |
||
91 | */ |
||
92 | public $oWidget; |
||
93 | |||
94 | /** |
||
95 | * Indicates the action hook to display setting notices. |
||
96 | * @since 3.7.9 |
||
97 | */ |
||
98 | public $sSettingNoticeActionHook = ''; |
||
99 | |||
100 | /** |
||
101 | * Stores the action hook name that gets triggered when the form registration is performed. |
||
102 | * 'admin_page' and 'network_admin_page' will use a custom hook for it. |
||
103 | * @since 3.7.0 |
||
104 | * @access pulbic Called externally. |
||
105 | */ |
||
106 | // public $_sFormRegistrationHook = 'admin_enqueue_scripts'; |
||
107 | // public $_sFormRegistrationHook = ''; |
||
108 | |||
109 | /** |
||
110 | * Sets up properties. |
||
111 | * @since 3.7.0 |
||
112 | */ |
||
113 | public function __construct( $oCaller, $sCallerPath, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType ) { |
||
131 | |||
132 | /** |
||
133 | * Overrides the parent method. |
||
134 | * No need to set `admin_init` to the `action_hook_form_registration` element. |
||
135 | * Otherwise, the widgets become not be updated visually, which is done in Ajax. |
||
136 | * |
||
137 | * @return array |
||
138 | * @since 3.8.14 |
||
139 | */ |
||
140 | public function getFormArguments() { |
||
147 | |||
148 | } |
||
149 |