Ejemplo n.º 1
0
    if (file_exists($wp_importer)) {
        require_once $wp_importer;
    } else {
        $errors = true;
    }
}
if ($errors) {
    echo "Errors while loading classes. Please use the standart wordpress importer.";
} else {
    include_once 'default_dummy_data.inc.php';
    if (!is_file($import_filepath . '_1.xml')) {
        echo "Problem with dummy data file. Please check the permisions of the xml file";
    } else {
        if (class_exists('WP_Import')) {
            global $wp_version;
            $our_class = new themeple_dummy_data();
            $our_class->fetch_attachments = true;
            $our_class->import($import_filepath . '_1.xml');
            $widget_text = array(2 => array('title' => 'About Church', 'text' => 'Nam nec tellus a odio tincidunt auctor a ornare odio. Sed non mauris vitae erat consequat auctor eu in elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris in erat justo. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi.', 'filter' => false), 3 => array('title' => '', 'text' => ' <div class="footer-box-1">
					  <h4>Contact</h4>
					  <address>
					  <p>The Church Branch,<br>
						123 Lorem Ipsum Avenue, New York
						United States, 012345</p>
					  <ul>
						<li><i class="fa fa-phone"></i>0123 456 7890</li>
						<li><i class="fa fa-print"></i>0123 456 7890</li>
						<li><i class="fa fa-envelope-o"></i><a href="mailto:" class="email">info@prayer.com</a></li>
						<li><i class="fa fa-skype"></i>0123 456 7890</li>
					  </ul>
					  </address>
Ejemplo n.º 2
0
    $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
    if (file_exists($class_wp_importer)) {
        require_once $class_wp_importer;
    } else {
        $errors = true;
    }
}
if (!class_exists('WP_Import')) {
    $wp_importer = THEMEPLE_FW_SYSTEM . 'wordpress-importer.php';
    if (file_exists($wp_importer)) {
        require_once $wp_importer;
    } else {
        $errors = true;
    }
}
if ($errors) {
    echo "Errors while loading classes. Please use the standart wordpress importer.";
} else {
    include_once 'themeple_dummy_data.inc.php';
    if (!is_file($import_filepath . '.xml')) {
        echo "Problem with dummy data file. Please check the permisions of the xml file";
    } else {
        if (class_exists('WP_Import')) {
            $our_class = new themeple_dummy_data();
            $our_class->fetch_attachments = false;
            $our_class->import($import_filepath . '.xml');
            $our_class->save_theme_options($import_filepath);
            //$our_class->set_default_menu();
        }
    }
}