Esempio n. 1
0
    function widget($args, $instance)
    {
        extract($args);
        $loc = get_locale();
        $emailtxt = 'text';
        if (xtreme_is_html5()) {
            $emailtxt = 'email';
        }
        echo $before_widget;
        if ($instance['title']) {
            echo $before_title . apply_filters('widget_title', $instance['title']) . $after_title;
        }
        ?>
<div>
	<form action="http://feedburner.google.com/fb/a/mailverify" method="post" <?php 
        xtreme_aria_required('application', true);
        ?>
>
		<div>
        <?php 
        if ($instance['text'] != '') {
            echo "<label for='x-email'>" . esc_html($instance['text']) . "</label>";
        }
        ?>
			<input class="x-newsletter-email" id="x-email" <?php 
        xtreme_aria_required('email', true);
        ?>
 type="<?php 
        echo $emailtxt;
        ?>
" name="email" value="<?php 
        echo esc_attr($instance['email']);
        ?>
" onfocus="if (this.value == '<?php 
        echo esc_js($instance['email']);
        ?>
') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php 
        echo esc_js($instance['email']);
        ?>
';}" />
			<input class="x-newsletter-submit" type="submit" value="<?php 
        echo esc_attr($instance['button_text']);
        ?>
" />
			<input type="hidden" value="<?php 
        echo esc_attr($instance['feedburner_id']);
        ?>
" name="uri" />
			<input type="hidden" name="loc" value="<?php 
        echo $loc;
        ?>
" />
		</div>
	</form>
</div>
        <?php 
        echo $after_widget;
    }
function _xtreme_column($col, $tpl)
{
    $el = 'div';
    $layout = xtreme_get_layout_class($tpl);
    $current = get_option(XF_LAYOUTS);
    $options = get_option(XF_OPTIONS);
    $identify_col = str_replace('ym-', '', $col);
    if (!xtreme_is_layout_2()) {
        $sb = isset($current[$layout][$identify_col . 'content']) ? $current[$layout][$identify_col . 'content']['value'] . '.php' : 'sidebar-one.php';
        $action_top = 'xtreme_' . $identify_col . '_top';
        $action_bottom = 'xtreme_' . $identify_col . '_bottom';
    } else {
        $sb = isset($current[$layout]['layout_2_' . $identify_col . 'content']) ? $current[$layout]['layout_2_' . $identify_col . 'content']['value'] . '.php' : 'sidebar-one.php';
        $action_top = 'xtreme_layout2_' . $identify_col . '_top';
        $action_bottom = 'xtreme_layout2_' . $identify_col . '_bottom';
    }
    if (xtreme_is_html5()) {
        $el = $options['xc_layout']['html5_tag']['value'];
    }
    echo '<' . $el . ' class="' . $col . '" ' . xtreme_aria_required('complementary', false) . '>';
    echo '<div class="' . $col . '_content ym-clearfix">';
    do_action($action_top);
    $located = '';
    foreach (array($sb) as $file) {
        if (file_exists(XF_CHILD_THEME_DIR . '/includes/sidebars/' . $file)) {
            $located = XF_CHILD_THEME_DIR . '/includes/sidebars/' . $file;
            break;
        } elseif (file_exists(XF_THEME_DIR . '/includes/sidebars/' . $file)) {
            $located = XF_THEME_DIR . '/includes/sidebars/' . $file;
            break;
        } else {
            $located = XF_THEME_DIR . '/includes/sidebars/sidebar-one.php';
        }
    }
    include $located;
    do_action($action_bottom);
    if ($col === 'ym-col3') {
        echo "  </div>";
        echo "  <div class='ym-ie-clearing'>&nbsp;</div>";
        echo '</' . $el . '>';
    } else {
        echo '</div></' . $el . '>';
    }
}
Esempio n. 3
0
<?php

$options = get_option(XF_OPTIONS);
$submitcls = false === $options['xc_navigation']['show_submit']['value'] ? "class='ym-hideme'" : "";
$submittxt = $options['xc_navigation']['submit_text']['value'];
$searchtxt = $options['xc_navigation']['input_text']['value'];
$txt = 'text';
if (xtreme_is_html5()) {
    $txt = 'search';
}
?>
<form <?php 
xtreme_aria_required('search', true);
?>
 method="get" id="searchform" action="<?php 
echo home_url();
?>
/" >
    <div><label class="screen-reader-text" for="s"><?php 
esc_attr_e('Search for:', XF_TEXTDOMAIN);
?>
</label>
    <input type="<?php 
echo $txt;
?>
" value="<?php 
esc_attr_e($searchtxt);
?>
" name="s" id="s" accesskey="s"/>
    <input type="submit" id="searchsubmit" value="<?php 
esc_attr_e($submittxt);
Esempio n. 4
0
function xtreme_navigation_searchform()
{
    $el = 'text';
    if (xtreme_is_html5()) {
        $el = 'search';
    }
    $options = get_option(XF_OPTIONS);
    $submitcls = false === $options['xc_navigation']['show_submit']['value'] ? "class='ym-hideme'" : "";
    $submittxt = $options['xc_navigation']['submit_text']['value'];
    $searchtxt = $options['xc_navigation']['input_text']['value'];
    $form = '<form ' . xtreme_aria_required('search', false) . ' method="get" id="searchform" action="' . home_url() . '/" >
    <div><label class="screen-reader-text" for="s">' . __('Search for:', XF_TEXTDOMAIN) . '</label>';
    $form .= "<input type='" . $el . "' value='" . esc_attr($searchtxt) . "' name='s' id='s' accesskey='s'/>\n";
    $form .= "<input type='submit' id='searchsubmit' value='" . esc_attr($submittxt) . "'  " . $submitcls . " />";
    $form .= "</div></form>";
    $html = '<ul class="nav_search"><li class="navsearch">' . $form . '</li></ul>';
    return $html;
}