How to add the “page” post type to Recent Activity widget displayed in admin?

Add page post type to your code (tested): add_filter( ‘dashboard_recent_posts_query_args’, function(array $queryArgs) { $postTypes = get_post_types([ ‘public’ => true, ‘capability_type’ => ‘post’, ]); $postTypes[] = ‘page’; if ( is_array( $postTypes ) ) { $queryArgs[‘post_type’] = $postTypes; } return $queryArgs; }, 15 ); The reason your original code did not include pages is because pages have … Read more

getBlockVariations(…) is undefined in Widget and Template Part editors but not Post Editor

Here’s why did you get an undefined The function itself was defined, but the function call (wp.blocks.getBlockVariations( ‘core/embed’ )) returned an undefined because by the time that you called the function, the block/Gutenberg editor had not yet been initialized. Hence, undefined was returned instead of an array of block variations, because core block types like … Read more