Plugin Directory

Changeset 673438


Ignore:
Timestamp:
02/26/2013 08:58:56 AM (13 years ago)
Author:
082net
Message:
  • Fixed deprecated messages
Location:
per-post-comment-settings/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • per-post-comment-settings/trunk/per-post-comment-settings.php

    r173431 r673438  
    33Plugin Name: Per Post Comment Settings
    44Plugin URI: http://082net.com/tag/per-post-comment-settings/?orderby=modified
    5 Version: 0.12
     5Version: 0.121
    66Description: You can change comment settings post by post on WP 2.7 or greater.
    77Author: Cheon, Youngmin
     
    161161<p><label for="close_comments_for_old_posts">
    162162<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', $conf['close_comments_for_old_posts']); ?> />
    163 <?php printf( __('Automatically close comments on articles older than %s days'), '</label><input name="close_comments_days_old" type="text" id="close_comments_days_old" value="' . attribute_escape($conf['close_comments_days_old']) . '" class="small-text" />') ?>
     163<?php printf( __('Automatically close comments on articles older than %s days'), '</label><input name="close_comments_days_old" type="text" id="close_comments_days_old" value="' . esc_attr($conf['close_comments_days_old']) . '" class="small-text" />') ?>
    164164</p>
    165165
     
    192192$default_comments_page .= '>' . __('first') . '</option></select>';
    193193
    194 printf( __('Break comments into pages with %1$s comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="text" id="comments_per_page" value="' . attribute_escape($conf['comments_per_page']) . '" class="small-text" />', $default_comments_page );
     194printf( __('Break comments into pages with %1$s comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="text" id="comments_per_page" value="' . esc_attr($conf['comments_per_page']) . '" class="small-text" />', $default_comments_page );
    195195
    196196?></label>
     
    217217            return false;
    218218       
    219         $post_id = (int) $post->ID;
    220         if (!$post_id)
     219        $post_id = isset($post) ? (int) $post->ID : 0;
     220        if (!$post_id && isset($id))
    221221            $post_id = (int) $id;
    222         if ( !$post_id )
     222        if ( !$post_id && isset($_POST['comment_post_ID']) )
    223223            $post_id = (int) $_POST['comment_post_ID'];
    224224        if (!$post_id)
  • per-post-comment-settings/trunk/readme.txt

    r121155 r673438  
    55Requires at least: 2.7
    66Tested up to: 2.7.1
    7 Stable tag: 0.12
     7Stable tag: 0.121
    88
    99You can change comment settings post by post on WP 2.7 or greater.
Note: See TracChangeset for help on using the changeset viewer.