コード例 #1
0
ファイル: functions.php プロジェクト: bexandy/ninacleaning
    function theme_comment($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case '':
                ?>
		<li <?php 
                comment_class();
                ?>
 id="li-comment-<?php 
                comment_ID();
                ?>
">
			<?php 
                ob_start();
                ?>
			<div class="comment-author vcard">
				<?php 
                echo theme_get_avatar(array('id' => $comment, 'size' => 48));
                ?>
				<?php 
                printf(__('%s <span class="says">says:</span>', THEME_NS), sprintf('<cite class="fn">%s</cite>', get_comment_author_link()));
                ?>
			</div>
			<?php 
                if ($comment->comment_approved == '0') {
                    ?>
				<em><?php 
                    _e('Your comment is awaiting moderation.', THEME_NS);
                    ?>
</em>
				<br />
			<?php 
                }
                ?>

			<div class="comment-meta commentmetadata"><a href="<?php 
                echo esc_url(get_comment_link($comment->comment_ID));
                ?>
">
				<?php 
                printf(__('%1$s at %2$s', THEME_NS), get_comment_date(), get_comment_time());
                ?>
</a><?php 
                edit_comment_link(__('(Edit)', THEME_NS), ' ');
                ?>
			</div>

			<div class="comment-body"><?php 
                comment_text();
                ?>
</div>

			<div class="reply">
				<?php 
                comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
                ?>
			</div>
			<?php 
                theme_post_wrapper(array('content' => ob_get_clean(), 'id' => 'comment-' . get_comment_ID()));
                ?>


		<?php 
                break;
            case 'pingback':
            case 'trackback':
                ?>
		<li class="post pingback">
		<?php 
                ob_start();
                ?>
			<p><?php 
                _e('Pingback:', THEME_NS);
                ?>
 <?php 
                comment_author_link();
                edit_comment_link(__('(Edit)', THEME_NS), ' ');
                ?>
</p>
		<?php 
                theme_post_wrapper(array('content' => ob_get_clean(), 'class' => $comment->comment_type));
                break;
        }
    }
コード例 #2
0
ファイル: archive.php プロジェクト: numfocus/website
 $post = $posts[0];
 ob_start();
 if (is_category()) {
     echo '<h4>' . single_cat_title('', false) . '</h4>';
     echo category_description();
 } elseif (is_tag()) {
     echo '<h4>' . single_tag_title('', false) . '</h4>';
 } elseif (is_day()) {
     echo '<h4>' . sprintf(__('Daily Archives: <span>%s</span>', THEME_NS), get_the_date()) . '</h4>';
 } elseif (is_month()) {
     echo '<h4>' . sprintf(__('Monthly Archives: <span>%s</span>', THEME_NS), get_the_date('F Y')) . '</h4>';
 } elseif (is_year()) {
     echo '<h4>' . sprintf(__('Yearly Archives: <span>%s</span>', THEME_NS), get_the_date('Y')) . '</h4>';
 } elseif (is_author()) {
     the_post();
     echo theme_get_avatar(array('id' => get_the_author_meta('user_email')));
     echo '<h4>' . get_the_author() . '</h4>';
     $desc = get_the_author_meta('description');
     if ($desc) {
         echo '<div class="author-description">' . $desc . '</div>';
     }
     rewind_posts();
 } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
     echo '<h4>' . __('Blog Archives', THEME_NS) . '</h4>';
 }
 theme_post_wrapper(array('content' => ob_get_clean(), 'class' => 'breadcrumbs'));
 /* Display navigation to next/previous pages when applicable */
 if (theme_get_option('theme_top_posts_navigation')) {
     theme_page_navigation();
 }
 /* Start the Loop */
コード例 #3
0
ファイル: theme.php プロジェクト: NaiRobley/Dabr
function theme_users_list($feed, $hide_pagination = false)
{
    if (isset($feed->users)) {
        $users = $feed->users;
    } else {
        $users = $feed;
    }
    $rows = array();
    if (count($users) == 0 || $users == '[]') {
        return '<p>No users to display.</p>';
    }
    foreach ($users as $user) {
        $content = "";
        if ($user->user) {
            $user = $user->user;
        }
        $name = theme('full_name', $user);
        $tweets_per_day = twitter_tweets_per_day($user);
        $last_tweet = strtotime($user->status->created_at);
        // $vicon = ($user->verified) ? theme('action_icon', "", '✔', 'verified') : '';
        $content = "{$name}<br />";
        //" <span class=\"actionicons\">{$vicon}</span>";
        $content .= "<span class='about'>";
        if ($user->description != "") {
            $content .= "Bio: " . twitter_parse_tags($user->description, $user->entities->description) . "<br />";
        }
        if ($user->location != "") {
            $content .= theme('action_icon', "https://maps.google.com/maps?q=" . urlencode($user->location), "<span class='icons'>⌖</span> {$user->location}", 'Location');
            $content .= "<br />";
        }
        $content .= "Info: ";
        $content .= pluralise('tweet', $user->statuses_count, true) . ", ";
        $content .= pluralise('friend', $user->friends_count, true) . ", ";
        $content .= pluralise('follower', $user->followers_count, true) . ", ";
        $content .= "~" . pluralise('tweet', $tweets_per_day, true) . " per day<br />";
        if ($user->status->created_at) {
            $content .= "Last tweet: ";
            if ($user->protected == 'true' && $last_tweet == 0) {
                $content .= "Private";
            } else {
                if ($last_tweet == 0) {
                    $content .= "Never tweeted";
                } else {
                    $content .= twitter_date('l jS F Y', $last_tweet);
                }
            }
        }
        $content .= "</span>";
        $rows[] = array('data' => array(array('data' => theme('avatar', theme_get_avatar($user)), 'class' => 'avatar'), array('data' => $content, 'class' => 'status shift')), 'class' => 'tweet');
    }
    $content = theme('table', array(), $rows, array('class' => 'followers'));
    if (!$hide_pagination) {
        #$content .= theme('pagination');
        $content .= theme('list_pagination', $feed);
    }
    return $content;
}
コード例 #4
0
ファイル: widgets.php プロジェクト: dreamteam111/dreamteam
    function widget($args, $instance)
    {
        global $user_ID, $user_identity, $user_level, $user_email, $user_login;
        extract($args);
        echo $before_widget;
        echo $before_title;
        if ($user_ID) {
            echo $user_identity;
            echo $after_title;
            echo theme_get_avatar(array('id' => $user_email, 'size' => 64, 'url' => get_bloginfo('wpurl') . '/wp-admin/profile.php'));
            ?>
			<ul class="alignleft">
				<li><a href="<?php 
            bloginfo('wpurl');
            ?>
/wp-admin/"><?php 
            _e('Dashboard', THEME_NS);
            ?>
</a></li>
				<?php 
            if ($user_level >= 1) {
                ?>
				<li><a href="<?php 
                bloginfo('wpurl');
                ?>
/wp-admin/post-new.php"><?php 
                _e('Publish', THEME_NS);
                ?>
</a></li>
				<li><a href="<?php 
                bloginfo('wpurl');
                ?>
/wp-admin/edit-comments.php"><?php 
                _e('Comments', THEME_NS);
                ?>
</a></li>
				<?php 
            }
            ?>
				<li><a href="<?php 
            echo wp_logout_url();
            ?>
&amp;redirect_to=<?php 
            echo urlencode(theme_get_current_url());
            ?>
"><?php 
            _e("Log out", THEME_NS);
            ?>
</a></li>
			</ul>
	  	<?php 
        } else {
            _e('Log In', THEME_NS);
            echo $after_title;
            ?>

			<form action="<?php 
            bloginfo('wpurl');
            ?>
/wp-login.php" method="post">
				<label for="log"><?php 
            _e('Username', THEME_NS);
            ?>
</label><br /><input type="text" name="log" id="log" value="<?php 
            echo esc_attr(stripslashes($user_login), 1);
            ?>
" size="20" /><br />
				<label for="pwd"><?php 
            _e("Password", THEME_NS);
            ?>
</label><br /><input type="password" name="pwd" id="pwd" size="20" /><br />
				<span class="art-button-wrapper">
					<span class="art-button-l"> </span>
					<span class="art-button-r"> </span>
					<input class="art-button" type="submit" name="submit" value="<?php 
            echo esc_attr(__('Log In', THEME_NS));
            ?>
" class="button" />
				</span>	
				<br />
				<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /><?php 
            _e('Remember Me', THEME_NS);
            ?>
</label><br />
				<input type="hidden" name="redirect_to" value="<?php 
            echo theme_get_current_url();
            ?>
"/>
			</form>
			<ul>
				<?php 
            if (get_option('users_can_register')) {
                ?>
<li><a href="<?php 
                bloginfo('wpurl');
                ?>
/wp-register.php"><?php 
                _e("Register", THEME_NS);
                ?>
</a></li><?php 
            }
            ?>
				<li><a href="<?php 
            bloginfo('wpurl');
            ?>
/wp-login.php?action=lostpassword"><?php 
            _e("Lost your password?", THEME_NS);
            ?>
</a></li>
			</ul>
		<?php 
        }
        ?>

	  <?php 
        echo $after_widget;
    }
コード例 #5
0
<?php 
        theme_post_wrapper(array('content' => ob_get_clean()));
        ?>
<ul id="comments-list">
	<?php 
        foreach ($comments as $comment) {
            ?>
		<li id="comment-<?php 
            comment_ID();
            ?>
">
      <?php 
            ob_start();
            ?>
      		<?php 
            echo theme_get_avatar(array('id' => $comment, 'size' => 32));
            ?>
			<cite><?php 
            comment_author_link();
            ?>
</cite>:
      <?php 
            if ($comment->comment_approved == '0') {
                ?>
			<em>
        <?php 
                _e('Your comment is awaiting moderation.', THEME_NS);
                ?>
      </em>
			<?php 
            }
コード例 #6
0
ファイル: twitter.php プロジェクト: dheere/twitubas
function theme_search_results($feed)
{
    $rows = array();
    foreach ($feed->results as $status) {
        $text = twitter_parse_tags($status->text, $status->entities);
        $link = theme('status_time_link', $status);
        $actions = theme('action_icons', $status);
        $row = array(theme('avatar', theme_get_avatar($status)), "<a href='user/{$status->from_user}'>{$status->from_user}</a> {$actions} - {$link}<br />{$text}");
        if (twitter_is_reply($status)) {
            $row = array('class' => 'reply', 'data' => $row);
        }
        $rows[] = $row;
    }
    $content = theme('table', array(), $rows, array('class' => 'timeline'));
    $content .= theme('pagination');
    return $content;
}
コード例 #7
0
function theme_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    switch ($comment->comment_type) {
        case '':
            ?>
		<li <?php 
            comment_class();
            ?>
 id="li-comment-<?php 
            comment_ID();
            ?>
">
			<div class="cleantheme-comment <?php 
            echo $comment->comment_type;
            ?>
 clearfix" id="comment-<?php 
            comment_ID();
            ?>
">
    <div class="cleantheme-comment-avatar"><?php 
            echo theme_get_avatar(array('id' => $comment, 'size' => 80));
            ?>
</div>
    <div class="cleantheme-comment-inner">
        <div class="cleantheme-comment-header comment-meta commentmetadata"><?php 
            printf(__('%s on ', THEME_NS), get_comment_author_link($comment->comment_ID));
            ?>
<a href="<?php 
            echo esc_url(get_comment_link($comment->comment_ID));
            ?>
"><?php 
            printf(__('%1$s at %2$s', THEME_NS), get_comment_date(), get_comment_time());
            ?>
</a>
<?php 
            edit_comment_link(__('(Edit)', THEME_NS));
            ?>
</div>
        <div class="cleantheme-comment-content comment-body"><?php 
            if ($comment->comment_approved == '0') {
                ?>
    <em><?php 
                _e('Your comment is awaiting moderation.', THEME_NS);
                ?>
</em>
    <br />
<?php 
            }
            comment_text();
            ?>
</div>
        <div class="cleantheme-comment-footer reply"><?php 
            comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
            ?>
</div>
    </div>
</div>
			<?php 
            break;
        case 'pingback':
        case 'trackback':
            ?>
		<li class="post pingback">
			<div class="cleantheme-comment <?php 
            echo $comment->comment_type;
            ?>
 clearfix">
				<div class="cleantheme-comment-content comment-body"><?php 
            _e('Pingback:', THEME_NS);
            ?>
 <?php 
            comment_author_link();
            edit_comment_link(__('(Edit)', THEME_NS), ' ');
            ?>
</div>
			</div>
			<?php 
            break;
    }
}
コード例 #8
0
ファイル: twitter.php プロジェクト: xctcc/npt
function theme_followers($feed, $hide_pagination = false, $list = false)
{
    $rows = array();
    $lists = $feed->users;
    if (count($lists) == 0) {
        return '<p>' . __('No users to display.') . '</p>';
    }
    foreach ($lists as $user) {
        $name = theme('full_name', $user);
        if ($list) {
            $name .= " <a href='" . BASE_URL . "confirm/listdelete/{$list}/{$user->screen_name}'>" . __("Delete From List") . "</a>";
        }
        $tweets_per_day = twitter_tweets_per_day($user);
        $last_tweet = strtotime($user->status->created_at);
        $content = "{$name}<br /><span class='about'>";
        if ($user->description != "") {
            $content .= "<strong>" . __("Bio: ") . "</strong>{$user->description}<br />";
        }
        if ($user->location != "") {
            $content .= "<strong>" . __("Location: ") . "</strong>{$user->location}<br />";
        }
        $content .= "<strong>" . __("Info: ") . "</strong>";
        $content .= $user->statuses_count . " " . __("Tweets") . " | ";
        $content .= $user->friends_count . " " . __("Friends") . " | ";
        $content .= $user->followers_count . " " . __("Followers") . " | ";
        $content .= "~" . $tweets_per_day . " " . __("Tweets Per Day") . "<br />";
        $content .= "<strong>" . __("Last tweet: ") . "</strong>";
        if ($user->protected == 'true' && $last_tweet == 0) {
            $content .= __("Private/Protected");
        } elseif ($last_tweet == 0) {
            $content .= __("Never tweeted");
        } else {
            // $content .= twitter_date('Y-m-d H:i', $last_tweet);
            $content .= format_interval(time() - $last_tweet) . __(" ago");
        }
        $content .= "</span>";
        $rows[] = array('data' => array(array('data' => theme('avatar', img_proxy_url(theme_get_avatar($user))), 'class' => 'avatar'), array('data' => $content, 'class' => 'status shift')), 'class' => 'tweet');
    }
    $content = theme('table', array(), $rows, array('class' => 'followers'));
    if (!$hide_pagination) {
        $content .= theme('list_pagination', $feed);
    }
    return $content;
}
コード例 #9
0
ファイル: twitter.php プロジェクト: JaHIY/Netputweets-Lite
function theme_search_results($feed)
{
    $rows = array();
    foreach ($feed->results as $status) {
        $text = twitter_parse_tags($status->text, $status->entities, $status->id_str);
        $link = theme('status_time_link', $status);
        $actions = theme('action_icons', $status);
        if (setting_fetch('avataro', 'yes') !== 'yes') {
            $row = array(theme('avatar', theme_get_avatar($status), htmlspecialchars($status->name, ENT_QUOTES, 'UTF-8')), "<a href='user/{$status->from_user}'>{$status->from_user}</a> {$actions} - {$link}<br />{$text}");
        } else {
            $row = array("<a href='user/{$status->from_user}'>{$status->from_user}</a> {$actions} - {$link}<br />{$text}");
        }
        if (twitter_is_reply($status)) {
            $row = array('class' => 'reply', 'data' => $row);
        }
        $rows[] = $row;
    }
    $content = theme('table', array(), $rows, array('class' => 'timeline'));
    $content .= theme('pagination');
    return $content;
}
コード例 #10
0
ファイル: theme.php プロジェクト: vinazol/Dabr
function theme_users_list($feed, $hide_pagination = false)
{
    if (isset($feed->users)) {
        $users = $feed->users;
    } else {
        $users = $feed;
    }
    $rows = array();
    if (count($users) == 0 || $users == '[]') {
        return '<p>' . _(NO_USERS_FOUND) . '</p>';
    }
    foreach ($users as $user) {
        $content = "";
        if ($user->user) {
            $user = $user->user;
        }
        $name = theme('full_name', $user);
        $tweets_per_day = twitter_tweets_per_day($user);
        $last_tweet = strtotime($user->status->created_at);
        $content = "{$name}<br />";
        $content .= "<span class='about'>";
        if ($user->description != "") {
            $content .= _(PROFILE_BIO) . ": " . twitter_parse_tags($user->description, $user->entities->description) . "<br />";
        }
        if ($user->location != "") {
            $content .= theme('action_icon', "https://maps.google.com/maps?q=" . urlencode($user->location), "<span class='icons'>⌖</span> {$user->location}", _(PROFILE_LOCATION));
            $content .= "<br />";
        }
        $content .= theme_user_info($user);
        if ($user->status->created_at) {
            $content .= " " . _(LAST_TWEET) . ": ";
            if ($user->protected == 'true' && $last_tweet == 0) {
                $content .= _(LAST_TWEET_PRIVATE);
            } else {
                if ($last_tweet == 0) {
                    $content .= _(LAST_TWEET_NEVER);
                } else {
                    $content .= twitter_date('l jS F Y', $last_tweet);
                }
            }
        }
        $content .= "</span>";
        $rows[] = array('data' => array(array('data' => theme('avatar', theme_get_avatar($user)), 'class' => 'avatar'), array('data' => $content, 'class' => 'status shift')), 'class' => 'tweet');
    }
    $content = theme('table', array(), $rows, array('class' => 'followers'));
    if (!$hide_pagination) {
        #$content .= theme('pagination');
        $content .= theme('list_pagination', $feed);
    }
    return $content;
}