$t ) { if ( 'gd-single' === $t->slug ) { $default_template_types[ $k ]->title = 'GD Single'; $default_template_types[ $k ]->description = __( 'The default template for displaying any GD single post. Use the `add new` feature to add a template per CPT.', 'blockstrap' ); } } return $default_template_types; } /** * Adds theme-supports. * * @access public * @since 1.0.0 * @return void */ public function action_setup() { // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); /* * Switch default core markup to output valid HTML5. * The comments block uses the markup from the comments template. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', ) ); // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); // Enqueue editor styles. add_theme_support( 'editor-styles' ); // './vendor/ayecode/wp-ayecode-ui/assets/css/ayecode-ui-compatibility.css', // this seems to break the wp inline CSS worker @todo https://github.com/WordPress/gutenberg/issues/33212#issuecomment-878053508 add_editor_style( array( './vendor/ayecode/wp-ayecode-ui/assets/css/ayecode-ui.css', ) ); // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); // Theme color pallets add_theme_support( 'editor-color-palette' ); // Menus add_theme_support( 'menus' ); // remove wp-container-X inline CSS helpers remove_filter( 'render_block', 'wp_render_layout_support_flag', 10, 2 ); remove_filter( 'render_block', 'gutenberg_render_layout_support_flag', 10, 2 ); // remove core WP patterns. remove_theme_support( 'core-block-patterns' ); } /** * Set the content width based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width Content width. * @since 1.0.0 * @access public */ public function action_content_width() { // This variable is intended to be overruled from themes. // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['content_width'] = apply_filters( 'blockstrap_content_width', 920 ); } } new BlockStrap_Theme_Support();