Пример #1
0
function weaverii_admin_subthemes()
{
    ?>

<h3>Predefined Weaver II Subthemes
<?php 
    weaverii_help_link('help.html#PredefinedThemes', 'Help for Weaver II Predefined Themes');
    ?>
<small style="font-weight:normal;font-size:10px;">&nbsp;&larr; You can click the ?'s found throughout Weaver II admin pages for context specific help.</small></h3>
<b>Welcome to Weaver II</b>

<p>For nearly five years, Weaver II has been one of the best WordPress themes available. But Weaver II is
showing its age, and we've developed <a href="//weavertheme.com/weaver-xtreme/" target="_blank">Weaver Xtreme</a>. It is
state of the art, and has many features expected in modern themes: better mobile support, full width support,
easier to use options, and support for the newest WordPress theme requirements. If you are just trying Weaver II
for the first time, we highly recommend that you use Weaver Xtreme instead!</p>


<?php 
    if (!has_action('weaverii_child_show_extrathemes')) {
        echo '<p>We suggest that you download the Weaver II Theme Extras Plugin for easy access to new subthemes.</p>';
    }
    do_action('weaverii_child_show_extrathemes');
    ?>

<h3 class="wvr-option-subheader">Get started by trying one of the predefined subthemes!</h3>
<?php 
    $theme_dir = trailingslashit(WP_CONTENT_DIR) . 'themes/' . get_template() . '/subthemes/';
    $theme_list = array();
    if ($media_dir = opendir($theme_dir)) {
        // build the list of themes from directory
        while ($m_file = readdir($media_dir)) {
            $len = strlen($m_file);
            $base = substr($m_file, 0, $len - 4);
            $ext = $len > 4 ? substr($m_file, $len - 4, 4) : '';
            if ($ext == '.w2t') {
                $theme_list[] = $base;
            }
        }
    }
    if (!empty($theme_list)) {
        weaverii_st_pick_theme($theme_list);
        // show the theme picker
    } else {
        echo "<h3>WARNING: Your version of Weaver II is likely installed incorrectly. Unable to find subtheme defiitions.</h3>\n";
    }
}
Пример #2
0
function weaverii_admin_subthemes()
{
    ?>

<h3>Predefined Weaver II Subthemes
<?php 
    weaverii_help_link('help.html#PredefinedThemes', 'Help for Weaver II Predefined Themes');
    ?>
<small style="font-weight:normal;font-size:10px;">&nbsp;&larr; You can click the ?'s found throughout Weaver II admin pages for context specific help.</small></h3>
<b>Welcome to Weaver II</b>

<p>Weaver II gives you extreme control of your WordPress blog appearance using the
different admin tabs here. This tab lets you get a quick start by picking one of the many
predefined subthemes. Once you've picked a starter theme, use the <em>Main Options</em> and <em>Advanced Options</em>
tabs to tweak the theme to be whatever you like. After you have a theme you're happy with,
you can save it from the Save/Restore tab. The <em>Help</em> tab has much more <b>useful</b> information.</p>

<p>We realize Weaver II has a <strong>lot</strong> of options. To help make it easier to get started,
you can click the "Hide Advanced Options" button found on the right side of the screen wherever a
"Save Options" button is found, and a simplified set of options will be displayed. Just click the "Show All Options" button
to once again show all options.</p>


<h3 class="wvr-option-subheader" style="color:red;font-style:italic">Visit our
<?php 
    weaverii_site('/subthemes/');
    ?>
website</a> for even more great looking subthemes!</h3>
<table><tr><td><img src="<?php 
    echo weaverii_relative_url('/images/');
    ?>
addon_themes.png" alt="addons" /></td>
<td><p style="margin-left:10px;">All the subthemes included here provide a great starting point, but we're trying hard to make even more great looking subthemes available for you to try. Click to check out our
<?php 
    weaverii_site('/subthemes/');
    ?>
<strong>Subthemes</strong></a> page now on the main Weaver II website.
</p></td></tr></table>

<?php 
    if (!has_action('weaverii_child_show_extrathemes')) {
        echo '<p>We suggest that you download the Weaver II Theme Extras Plugin for easy access to new subthemes.</p>';
    }
    do_action('weaverii_child_show_extrathemes');
    ?>

<h3 class="wvr-option-subheader">Get started by trying one of the predefined subthemes!</h3>
<?php 
    $theme_dir = trailingslashit(WP_CONTENT_DIR) . 'themes/' . get_template() . '/subthemes/';
    $theme_list = array();
    if ($media_dir = opendir($theme_dir)) {
        // build the list of themes from directory
        while ($m_file = readdir($media_dir)) {
            $len = strlen($m_file);
            $base = substr($m_file, 0, $len - 4);
            $ext = $len > 4 ? substr($m_file, $len - 4, 4) : '';
            if ($ext == '.w2t') {
                $theme_list[] = $base;
            }
        }
    }
    if (!empty($theme_list)) {
        weaverii_st_pick_theme($theme_list);
        // show the theme picker
    } else {
        echo "<h3>WARNING: Your version of Weaver II is likely installed incorrectly. Unable to find subtheme defiitions.</h3>\n";
    }
}