Plugin Directory

Changeset 807663


Ignore:
Timestamp:
11/20/2013 05:13:39 PM (12 years ago)
Author:
mohanjith
Message:
  • Preserve post status when editing in frontend
Location:
wordpress-wiki-plugin/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wordpress-wiki-plugin/trunk/readme.txt

    r782312 r807663  
    55Requires at least: 3.0.1
    66Tested up to: 3.6.1
    7 Stable tag: tags/1.0.8.2
     7Stable tag: tags/1.0.8.3
    88
    99Create a wiki as easily as adding a post
     
    8888
    8989== Upgrade Notice ==
    90 * Fix slug issue
     90* Preserve post status when editing in frontend
    9191
    9292== Changelog ==
     93
     94= 1.0.8.3 =
     95* Preserve post status when editing in frontend
    9396
    9497= 1.0.8.2 =
  • wordpress-wiki-plugin/trunk/wordpress-wiki-plugin.php

    r782312 r807663  
    66 Author: S H Mohanjith (Incsub)
    77 WDP ID: 225
    8  Version: 1.0.8.2
     8 Version: 1.0.8.3
    99 Stable tag: trunk
    1010 Author URI: http://premium.wpmudev.org
     
    2929     * @var     string  $current_version    Current version
    3030     */
    31     var $current_version = '1.0.8.2';
     31    var $current_version = '1.0.8.3';
    3232    /**
    3333     * @var     string  $translation_domain Translation domain
     
    875875    echo '<input type="hidden" name="post_type" id="post_type" value="'.$edit_post->post_type.'" />';
    876876    echo '<input type="hidden" name="post_ID" id="wiki_id" value="'.$edit_post->ID.'" />';
    877     echo '<input type="hidden" name="post_status" id="wiki_id" value="published" />';
     877
     878    if ( 'private' == $edit_post->post_status ) {
     879        $edit_post->post_password = '';
     880        $visibility = 'private';
     881        $visibility_trans = __('Private');
     882    } elseif ( !empty( $edit_post->post_password ) ) {
     883        $visibility = 'password';
     884        $visibility_trans = __('Password protected');
     885    } else {
     886        $visibility = 'public';
     887        $visibility_trans = __('Public');
     888    }
     889
     890    echo '<input type="hidden" name="post_status" id="wiki_post_status" value="'.$edit_post->post_status.'" />';
     891    echo '<input type="hidden" name="visibility" id="wiki_visibility" value="'.$visibility.'" />';
     892
    878893    echo '<input type="hidden" name="comment_status" id="comment_status" value="open" />';
    879894    echo '<input type="hidden" name="action" id="wiki_action" value="editpost" />';
Note: See TracChangeset for help on using the changeset viewer.