Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aurovrata committed Dec 7, 2015
1 parent 6431f09 commit 5282c7c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions reorder-posts-within-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ function ReOrderPostWithinCategory() {
}
}
function admin_dashboard_notice() {
if(empty($this->getAdminOptions())) {
$options = $this->getAdminOptions();
if(empty($options)) {
?>
<div class="updated re_order">
<p><?php echo sprintf(__( 'Vous devez enregistrer <a href="%s">vos préférences <em>ReOrder Posts in Categories</em></a> au préalables.','deefusereorder' ), admin_url('options-general.php?page=reorder-posts-within-categories.php')); ?></p>
Expand Down Expand Up @@ -168,16 +169,16 @@ public function deletePost_callBack($post_id){
* We need to inspect all associated taxonomies
* @param type $post_id
*/
public function savePost_callBack($post_id)
{
if(empty($this->getAdminOptions())) return; //order settings not saved yet
public function savePost_callBack($post_id){
$orderedSettingOptions = $this->getAdminOptions();
if(empty($orderedSettingOptions)) return; //order settings not saved yet
//verify post is not a revision
if ( !wp_is_post_revision( $post_id ) ) {
global $wpdb;

$table_name = $wpdb->prefix . $this->deefuse_ReOrder_tableName;
//let's get the options first
$orderedSettingOptions = $this->getAdminOptions();

// Type de post
$post_type = get_post_type($post_id);
$post_type = get_post_type_object($post_type);
Expand Down

0 comments on commit 5282c7c

Please sign in to comment.