コード例 #1
0
 public function disallow_index()
 {
     if (ks_is_comment_post() || ks_is_redir()) {
         echo '<meta name="robots" content="noindex,nofollow" />' . "\n";
     }
 }
コード例 #2
0
            }
            ?>
			</dl>
		<?php 
        } else {
            // If there are no comments yet
            ?>
			<p><?php 
            echo $type != 'pings' ? __('No comments yet.') : __('No pings yet.', 'ktai_style');
            ?>
</p>
		<?php 
        }
    }
    ks_comments_post_link(NULL, '<div>', '</div>');
} elseif (ks_is_comment_post()) {
    $login_url = ks_get_login_url(KTAI_NOT_ECHO, ks_comments_post_url());
    if (!comments_open()) {
        ?>
		<p><?php 
        _e('Sorry, the comment form is closed at this time.');
        ?>
</p>
	<?php 
    } elseif (get_option('comment_registration') && !is_user_logged_in()) {
        if ($login_url) {
            ?>
			<p><?php 
            printf(__('You must be <a href="%s">logged in</a> to post a comment.'), esc_url($login_url));
            ?>
</p>
コード例 #3
0
function ks_check_password($message = '')
{
    if (empty($message)) {
        $message = __("This post is password protected. To view it please enter your password below:");
    }
    if (!ks_post_password_required()) {
        return NULL;
    } else {
        $form = '<form method="post" action="' . htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) . '"><p>' . $message . '</p><p><input name="post_password" type="password" size="20" />';
        if (ks_is_comments_list()) {
            $form .= '<input type="hidden" name="view" value="co_list" />';
        } elseif (ks_is_comment_post()) {
            $form .= '<input type="hidden" name="view" value="co_post" />';
        }
        $url = parse_url($_SERVER['REQUEST_URI']);
        $query = $url['query'];
        if (empty($query) && isset($_POST['urlquery'])) {
            $query = $_POST['urlquery'];
        }
        if ($query) {
            $form .= '<input type="hidden" name="urlquery" value="' . htmlspecialchars($query, ENT_QUOTES) . '" />';
        }
        $form .= '<input type="submit" name="Submit" value="' . __("Submit") . '" /></p></form>';
        return $form;
    }
}