File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,7 +157,15 @@ class Media extends Settings_Component implements Setup {
157157 */
158158 public function __construct ( Plugin $ plugin ) {
159159 $ this ->plugin = $ plugin ;
160+ add_action ( 'init ' , array ( $ this , 'init_hook ' ) );
161+ }
160162
163+ /**
164+ * Initialize WordPress hooks for the Cloudinary media integration.
165+ *
166+ * @return void
167+ */
168+ public function init_hook () {
161169 /**
162170 * Filter the Cloudinary Media Library filters.
163171 *
Original file line number Diff line number Diff line change @@ -35,6 +35,17 @@ class Meta_Box {
3535 */
3636 public function __construct ( Plugin $ plugin ) {
3737 $ this ->plugin = $ plugin ;
38+ add_action ( 'init ' , array ( $ this , 'init_hook ' ) );
39+ }
40+
41+ /**
42+ * Initializes hooks for the meta box.
43+ *
44+ * Hooks into WordPress to add meta boxes and registers necessary handlers.
45+ *
46+ * @return void
47+ */
48+ public function init_hook () {
3849 add_action ( 'add_meta_boxes ' , array ( $ this , 'register_meta_box ' ) );
3950 $ this ->register_handlers ();
4051 }
You can’t perform that action at this time.
0 commit comments