Esempio n. 1
0
 function wallow_get_opt($opt)
 {
     global $wallow_opt;
     if (isset($wallow_opt[$opt])) {
         return apply_filters('wallow_option_' . $opt, $wallow_opt[$opt], $opt);
     }
     $defopt = wallow_get_coa($opt);
     if (!$defopt) {
         return null;
     }
     if ($defopt['req'] == '' || wallow_get_opt($defopt['req'])) {
         return $defopt['default'];
     } else {
         return null;
     }
 }
Esempio n. 2
0
    function avatar()
    {
        global $current_user;
        ?>
	<div id="avatar_cont" class="no-grav">
		<?php 
        if (wallow_get_opt('wallow_qbar_avatar')) {
            echo '<img width="50" height="50" class="avatar avatar-50 photo" src="' . esc_url(wallow_get_opt('wallow_qbar_avatar')) . '" alt="user-avatar">';
        } elseif (is_user_logged_in()) {
            //fix for notice when user not log-in
            get_currentuserinfo();
            $email = $current_user->user_email;
            echo get_avatar($email, 50, $default = get_template_directory_uri() . '/images/user.png', 'user-avatar');
        } else {
            echo '<img width="50" height="50" class="avatar avatar-50 photo" src="' . get_template_directory_uri() . '/images/user.png" alt="user-avatar">';
        }
        ?>
	</div>
<?php 
    }
Esempio n. 3
0
	<h3 class="storytitle"><a href="<?php 
the_permalink();
?>
" rel="bookmark"><?php 
the_title();
?>
</a></h3>

	<?php 
wallow_hook_post_title_after();
?>

	<div class="storycontent">
		<?php 
switch (wallow_get_opt('wallow_postexcerpt')) {
    case 0:
        the_content();
        break;
    case 1:
        the_excerpt();
        break;
}
?>
	</div>

	<?php 
wallow_hook_entry_bottom();
?>

</div>
Esempio n. 4
0
function wallow_body_classes($classes)
{
    if (wallow_get_opt('wallow_theme_set') === '1') {
        // use custom combinations
        $genlook = wallow_get_opt('wallow_theme_genlook');
        $sidebar = wallow_get_opt('wallow_theme_sidebar');
        $menu = wallow_get_opt('wallow_theme_pages');
        $popup = wallow_get_opt('wallow_theme_popup');
        $quickbar = wallow_get_opt('wallow_theme_quickbar');
        $avatar = wallow_get_opt('wallow_theme_avatar');
    } else {
        // output a default theme set
        $theme_set = wallow_get_opt('wallow_theme_set');
        $genlook = $theme_set;
        $sidebar = $theme_set;
        $menu = $theme_set;
        $popup = $theme_set;
        $quickbar = $theme_set;
        $avatar = $theme_set;
    }
    $classes[] = esc_attr('body-' . $genlook);
    $classes[] = esc_attr('sidebar-' . $sidebar);
    $classes[] = esc_attr('menu-' . $menu);
    $classes[] = esc_attr('quickbar-' . $quickbar);
    $classes[] = esc_attr('popup-' . $popup);
    $classes[] = esc_attr('avatar-' . $avatar);
    $classes[] = 'wlw-no-js';
    if (wallow_get_opt('wallow_qbar')) {
        $classes[] = 'quickbar';
    }
    if (!wallow_get_opt('wallow_sidebar')) {
        $classes[] = 'no-sidebar';
    }
    return $classes;
}
Esempio n. 5
0
function wallow_get_comments_link($args = '')
{
    $defaults = array('zero' => false, 'one' => false, 'more' => false, 'css_class' => '', 'none' => false, 'before' => '', 'after' => '', 'id' => false);
    $args = wp_parse_args($args, $defaults);
    extract($args, EXTR_SKIP);
    if (false === $zero) {
        $zero = __('Leave a Comment', 'wallow');
    }
    if (false === $one) {
        $one = __('1 Comment', 'wallow');
    }
    if (false === $more) {
        $more = __('% Comments', 'wallow');
    }
    if (false === $none) {
        $none = __('Comments Off', 'wallow');
    }
    $id = $id ? (int) $id : get_the_ID();
    $css_class = !empty($css_class) ? ' class="' . esc_attr($css_class) . '"' : '';
    $number = get_comments_number($id);
    if (0 == $number && !comments_open() && !pings_open()) {
        $output = $none ? $before . '<span' . $css_class . '>' . $none . '</span>' . $after : '';
    } elseif (post_password_required()) {
        $output = $before . __('Enter your password to view comments', 'wallow') . $after;
    } else {
        $label = wallow_get_opt('wallow_cust_comrep') ? '#comments' : '#respond';
        $href = 0 == $number ? get_permalink() . $label : get_comments_link();
        $title = esc_attr(sprintf(__('Comment on %s', 'wallow'), the_title_attribute(array('echo' => 0))));
        if ($number > 1) {
            $text = str_replace('%', number_format_i18n($number), $more);
        } elseif ($number == 0) {
            $text = $zero;
        } else {
            $text = $one;
        }
        $output = $before . '<a' . $css_class . ' href="' . esc_url($href) . '" title="' . esc_attr($title) . '">' . $text . '</a>' . $after;
    }
    return apply_filters('wallow_get_comments_link', $output);
}
Esempio n. 6
0
    function wallow_preview()
    {
        $theme_set = wallow_get_opt('wallow_theme_set');
        $genlook = $theme_set === '1' ? wallow_get_opt('wallow_theme_genlook') : $theme_set;
        $pages = $theme_set === '1' ? wallow_get_opt('wallow_theme_pages') : $theme_set;
        $quickbar = $theme_set === '1' ? wallow_get_opt('wallow_theme_quickbar') : $theme_set;
        $sidebar = $theme_set === '1' ? wallow_get_opt('wallow_theme_sidebar') : $theme_set;
        $avatar = $theme_set === '1' ? wallow_get_opt('wallow_theme_avatar') : $theme_set;
        $popup = $theme_set === '1' ? wallow_get_opt('wallow_theme_popup') : $theme_set;
        ?>
	<div id="theme_preview">
		<div id="tp_wallow_theme_genlook" class="<?php 
        echo $genlook;
        ?>
"></div>
		<div id="tp_wallow_theme_pages" class="<?php 
        echo $pages;
        ?>
"></div>
		<div id="tp_wallow_theme_quickbar" class="<?php 
        echo $quickbar;
        ?>
"></div>
		<div id="tp_wallow_theme_sidebar" class="<?php 
        echo $sidebar;
        ?>
"></div>
		<div id="tp_wallow_theme_avatar" class="<?php 
        echo $avatar;
        ?>
"></div>
		<div id="tp_wallow_theme_popup" class="<?php 
        echo $popup;
        ?>
"></div>
	</div>
<?php 
    }
Esempio n. 7
0
 function get_option($option)
 {
     return wallow_get_opt($option);
 }
Esempio n. 8
0
			<div id="credits" class="fixfloat">
				&copy; <?php 
echo date("Y");
?>
  <strong><?php 
bloginfo('name');
?>
</strong> <?php 
_e('All rights reserved', 'wallow');
?>
				<?php 
wallow_hook_change_view();
?>
				<?php 
if (wallow_get_opt('wallow_tbcred')) {
    ?>
 - Powered by <a href="http://wordpress.org"><strong>WordPress</strong></a> and <a title="v<?php 
    echo esc_attr(wallow_get_info('version'));
    ?>
" href="http://www.twobeers.net/"><strong>Wallow</strong></a><?php 
}
?>
 - <?php 
_e('Have fun!', 'wallow');
?>
			</div>

			<!-- <?php 
echo get_num_queries();
?>
Esempio n. 9
0
/**
 * Register the widgets on startup.
 * 
 * Widgets list is filterable.
 */
function wallow_register_widgets()
{
    if (!is_blog_installed()) {
        return;
    }
    if (!wallow_get_opt('wallow_custom_widgets')) {
        return;
    }
    register_widget('Wallow_Widget_Popular_Posts');
    register_widget('Wallow_Widget_Latest_Commented_Posts');
    register_widget('Wallow_Widget_Latest_Commentators');
    register_widget('Wallow_Widget_User_Quick_Links');
    register_widget('Wallow_Widget_Pop_Categories');
    register_widget('Wallow_Widget_Social');
    register_widget('Wallow_Widget_Recent_Posts');
    register_widget('Wallow_Widget_Image_Details');
    register_widget('Wallow_Widget_Share_This');
    register_widget('Wallow_Widget_Post_Details');
    register_widget('Wallow_Widget_Clean_Archives');
}