esc_html__( 'Theme demo content', 'auberge' ), 'import_file_url' => esc_url_raw( 'https://raw.githubusercontent.com/webmandesign/demo-content/master/auberge/content/demo-content-auberge.xml' ), 'import_widget_file_url' => esc_url_raw( 'https://raw.githubusercontent.com/webmandesign/demo-content/master/auberge/widgets/auberge-widgets.wie' ), ), ); } // /files /** * 20) Texts */ /** * Info texts * * @since 2.1 * @version 2.2.1 * * @param string $text Default intro text. */ public static function info( $text = '' ) { // Processing $text .= '
'; $text .= '

'; $text .= esc_html__( 'Media files quality', 'auberge' ); $text .= '

'; $text .= '

'; $text .= esc_html__( 'Please note that imported media files (such as images, video and audio files) are of low quality to prevent copyright infringement.', 'auberge' ); $text .= ' ' . esc_html__( 'Please read "Credits" section of theme documentation for reference where the demo media files were obtained from.', 'auberge' ); $text .= ' ' . esc_html__( 'Get media for your website »', 'auberge' ) . ''; $text .= '

'; $text .= '
'; $text .= '
'; $text .= '

'; $text .= esc_html__( 'Install required plugins!', 'auberge' ); $text .= '

'; $text .= '

'; $text .= esc_html__( 'Please read the information about the theme demo required plugins first.', 'auberge' ); $text .= ' ' . esc_html__( 'If you do not install and activate demo required plugins, some of the content will not be imported.', 'auberge' ); $text .= ' '; $text .= esc_html__( 'View the list of required plugins »', 'auberge' ); $text .= ''; $text .= '

'; $text .= '
'; // Output return $text; } // /info /** * 30) Setup */ /** * After import actions * * @since 2.1 * @version 2.1 * * @param string $selected_import */ public static function after( $selected_import = '' ) { // Processing // Front and blog page self::front_and_blog_page(); // Menu locations self::menu_locations(); } // /after /** * Setup front and blog page * * @since 2.1 * @version 2.1 */ public static function front_and_blog_page() { // Processing update_option( 'show_on_front', 'page' ); // Front page $page_front = get_page_by_path( 'sample-page-2' ); update_option( 'page_on_front', $page_front->ID ); // Blog page $page_blog = get_page_by_path( 'blog' ); update_option( 'page_for_posts', $page_blog->ID ); } // /front_and_blog_page /** * Setup navigation menu locations * * @since 2.1 * @version 2.1.1 */ public static function menu_locations() { // Helper variables $menu = array(); $menu['primary'] = get_term_by( 'slug', 'main-navigation', 'nav_menu' ); $menu['social'] = get_term_by( 'slug', 'social-links', 'nav_menu' ); // Processing set_theme_mod( 'nav_menu_locations', array( 'primary' => ( isset( $menu['primary']->term_id ) ) ? ( $menu['primary']->term_id ) : ( null ), 'social' => ( isset( $menu['social']->term_id ) ) ? ( $menu['social']->term_id ) : ( null ), ) ); } // /menu_locations /** * Remove all widgets from sidebars first * * @since 2.1 * @version 2.1.1 */ public static function before_widgets_import() { // Processing delete_option( 'sidebars_widgets' ); } // /before_widgets_import /** * 100) Helpers */ /** * OCDI plugin admin page styles * * @since 2.1.1 * @version 2.1.1 */ public static function styles() { // Processing // OCDI 2.0 styling fix wp_add_inline_style( 'ocdi-main-css', '.ocdi.about-wrap { max-width: 66em; }' ); } // /styles } // /Auberge_One_Click_Demo_Import add_action( 'after_setup_theme', 'Auberge_One_Click_Demo_Import::init', 5 );