';
$text .= '
';
$text .= esc_html__( 'Manual import procedure', 'auberge' );
$text .= '
';
$text .= '';
$text .= esc_html__( 'By importing this demo content you get the exact copy of the theme demo website.', 'auberge' );
$text .= ' (' . esc_html__( 'Preview the theme demo website »', 'auberge' ) . ')';
$text .= '
';
$text .= esc_html__( 'For instructions on importing theme demo content please visit GitHub repository.', 'auberge' );
$text .= ' (' . esc_html__( 'GitHub repository instructions »', 'auberge' ) . ')';
$text .= '
';
$text .= '';
$text .= '';
$text .= '';
$text .= '
';
$text .= esc_html__( 'Install demo 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 .= '
';
$text .= '';
$text .= esc_html__( '(Note that this set of plugins may differ from plugins recommended under Appearance → Install Plugins!)', 'auberge' );
$text .= '';
$text .= '
';
$text .= '
';
// Output
return $text;
} // /info
/**
* 20) 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.8.0
*/
public static function styles() {
// Processing
wp_add_inline_style(
'ocdi-main-css',
'.ocdi__content-container { max-width: 1024px; }'
);
} // /styles
} // /Auberge_One_Click_Demo_Import
add_action( 'after_setup_theme', 'Auberge_One_Click_Demo_Import::init', 5 );