This file contains hidden or 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
// Συνδεση στο hook που ανιχνεύει τις αλλαγές των post status | |
add_action('transition_post_status', 'post_to_list2', 10, 3); | |
function post_to_list2($new_status, $old_status, $post) { | |
// Σε ενα νέο post το post status είναι πάντα draft->publish | |
// Σε ενα ανανεωμένο post το post status είναι πάντα publish->publish | |
if ('publish' === $old_status) | |
return; // new posts only! | |
if ('publish' !== $new_status) |
NewerOlder