diff --git a/projects/packages/publicize/changelog/update-publicize-ui-init-on-admin-only b/projects/packages/publicize/changelog/update-publicize-ui-init-on-admin-only new file mode 100644 index 0000000000000..ab5c5069aacb4 --- /dev/null +++ b/projects/packages/publicize/changelog/update-publicize-ui-init-on-admin-only @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Moved initialization of Publicize UI from init action to admin_init action diff --git a/projects/packages/publicize/src/class-publicize-ui.php b/projects/packages/publicize/src/class-publicize-ui.php index a478d88894105..ccb307783bf85 100644 --- a/projects/packages/publicize/src/class-publicize-ui.php +++ b/projects/packages/publicize/src/class-publicize-ui.php @@ -38,7 +38,7 @@ public function __construct() { } $this->publicize = $publicize; - add_action( 'init', array( $this, 'init' ) ); + add_action( 'admin_init', array( $this, 'init' ) ); } /**