You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/class-comment.php
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -560,6 +560,12 @@ public static function is_registered_comment_type( $slug ) {
560
560
* @return array The registered custom comment type slugs.
561
561
*/
562
562
publicstaticfunctionget_comment_type_slugs() {
563
+
if ( ! did_action( 'init' ) ) {
564
+
_doing_it_wrong( __METHOD__, 'This function should not be called before the init action has run. Comment types are only available after init.', 'unreleased' );
0 commit comments