%2$s

'; } /** * HTML Tag Scheme */ function bayn_html_tag_schema() { $schema = 'http://schema.org/'; // Is single post. if ( is_single() ) { $type = 'Article'; } // End if(). elseif ( is_author() ) { $type = 'ProfilePage'; } // Is search results page. elseif ( is_search() ) { $type = 'SearchResultsPage'; } else { $type = 'WebPage'; } echo 'itemscope="itemscope" itemtype="' . $schema . $type . '"'; // WPCS: XSS OK. } /** * Demo files for importing. * * @return array List of demos configuration. */ function bayn_import_files() { return array( array( 'import_file_name' => esc_html__( 'Demo 1', 'bayn' ), 'local_import_file_url' => get_template_directory_uri() . '/demo/content.xml', 'local_import_widget_file_url' => get_template_directory_uri() . '/demo/widgets.wie', 'local_import_customizer_file_url' => get_template_directory_uri() . '/demo/theme-options.dat', 'import_preview_image_url' => get_template_directory_uri() . '/screenshot.jpg', ), ); } add_filter( 'pt-ocdi/import_files', 'bayn_import_files' ); /** * Setup the theme after importing demo. */ function bayn_after_import_setup() { // Assign menus to their locations. $menu_main = get_term_by( 'slug', 'main', 'nav_menu' ); set_theme_mod( 'nav_menu_locations', array( 'menu-1' => $menu_main->term_id, ) ); // Font page. $home = get_page_by_title( 'Front Page' ); if ( $home ) { update_option( 'show_on_front', 'page' ); update_option( 'page_on_front', $home->ID ); } // Blog page. $blog = get_page_by_title( 'Blog' ); if ( $blog ) { update_option( 'page_for_posts', $blog->ID ); } } add_action( 'pt-ocdi/after_import', 'bayn_after_import_setup' );