Created
July 14, 2014 19:05
-
-
Save stnkris/58601609a899eb7f9fc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- <unnamed> | |
+++ /home/kris/Desktop/patch.diff | |
@@ -456,7 +456,24 @@ | |
delete_post_meta( $recipe_id, $field, $old ); | |
} | |
} | |
- } | |
+ } // endforeach | |
+ | |
+ //if ( ! wp_is_post_revision( $recipe_id ) ){ | |
+ // unhook this function so it doesn't loop infinitely | |
+ remove_action('save_post', array($this, __FUNCTION__)); | |
+ | |
+ $recipe->post_content = $data['rpr_recipe_description']; | |
+ | |
+ // update the post, which calls save_post again | |
+ $x = wp_update_post( array( | |
+ 'ID' => $recipe_id, | |
+ 'post_content' => $recipe->post_content, | |
+ 'post_excerpt' => $recipe->post_content | |
+ ) ); | |
+ | |
+ // re-hook this function | |
+ add_action('save_post', array($this, __FUNCTION__)); | |
+ //} | |
} | |
} | |
Included this in development version on branch "excerpts" (https://github.com/dasmaeh/recipepress-reloaded/tree/excerpts).
Will be in release 0.7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the patch for
php/class/rpr_core.php