Пример #1
0
if (!defined('WP_LOAD_IMPORTERS')) {
    define('WP_LOAD_IMPORTERS', true);
}
// Load Importer API
require_once ABSPATH . 'wp-admin/includes/import.php';
$importerError = false;
if (!class_exists('WP_Importer')) {
    $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
    if (file_exists($class_wp_importer)) {
        require_once $class_wp_importer;
    }
} else {
    $importerError = true;
}
if (!class_exists('WP_Import')) {
    $class_wp_import = framework_path() . 'classes/wordpress-importer/wordpress-importer.php';
    if (file_exists($class_wp_import)) {
        require_once $class_wp_import;
    } else {
        $importerError = true;
    }
}
class SpyropressImporter extends WP_Import
{
    protected $key;
    protected $import_filepath;
    function __construct($key)
    {
        $this->key = $key;
        $this->import_filepath = include_path() . 'sample/';
        $this->import_file();
Пример #2
0
	<div class="welcome-panel-content">
		<h3>
			<?php 
    _e('Welcome to SpyroPress! Update your Theme from the WordPress Dashboard', 'spyropress');
    ?>

		</h3>
		<p class="about-description">	
            <?php 
    _e('If you want to get update notifications for your themes and if you want to be able to update your theme from your WordPress backend you need to enter your item purchase code, themeforest account name and themeforest secret API Key below:', 'spyropress');
    ?>
<br />
		</p>
        <br />
        <?php 
    if (!wp_is_writable(framework_path())) {
        include_once 'page-status.php';
    } else {
        ?>

        <form method="post" style="width:80%" enctype="multipart/form-data" id="spyropress_form">
            <div class="section">
                <h3 class="heading"><?php 
        _e('Themeforest Username', 'spyropress');
        ?>
</h4>
                <div class="controls">
                    <input class="field" type="text" value="<?php 
        echo $envato_username;
        ?>
" name="envato_username" placeholder="<?php 
Пример #3
0
<h3>
	<?php 
_e('System Status! ', 'spyropress');
echo $status;
?>

</h3>
<br />
<div class="row-fluid">
    <div class="span2"><strong><?php 
_e('Framework Directory:', 'spyropress');
?>
</strong></div>
    <div class="span6"><?php 
echo framework_path();
?>
</div>
    <div class="span2"><?php 
echo $framework ? $writable_msg : $not_writable_msg;
?>
</div>
</div>
<div class="row-fluid">
    <div class="span2"><strong><?php 
_e('CSS Directory:', 'spyropress');
?>
</strong></div>
    <div class="span6"><?php 
echo template_path() . 'assets/css/';
?>
                <label>Choose a Column Type</label>
                <?php 
spyropress_builder_render_columns();
?>

                <div class="clear"></div>
            </div>
        </div>
        <!-- /builder-columns-drawer -->
        <div class="builder-footer">
            <a href="#builder-rows" id="builder-row-add" class="button-primary pull-right">New Row</a>
            <div class="clear"></div>
        </div>
        <!-- /builder-footer -->
        <?php 
include framework_path() . 'builder/builder-ui-dialogs.php';
?>

        <div id="builder-media-toolbar">
        <?php 
if (!$is_content && post_type_supports(get_current_post_type(), 'thumbnail')) {
    echo '<div id="wp-' . $editor_id . '-editor-tools" class="wp-editor-tools">';
    if (!function_exists('media_buttons')) {
        include ABSPATH . 'wp-admin/includes/media.php';
    }
    echo '<div id="wp-' . $editor_id . '-media-buttons" class="hide-if-no-js wp-media-buttons">';
    do_action('media_buttons', $editor_id);
    echo "</div>\n";
    echo "</div>\n";
}
?>
Пример #5
0
function spyropress_ui_include($item, $id, $value, $is_widget = false, $is_builder = false)
{
    include framework_path() . $id;
}