Title: a remark on a code comment
Last modified: August 21, 2016

---

# a remark on a code comment

 *  Resolved [Birgir Erlendsson (birgire)](https://wordpress.org/support/users/birgire/)
 * (@birgire)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/a-remark-on-a-code-comment/)
 * Great plugin!
 * I have just a minor remark about this code comment:
 *     ```
       function apt_check_required_transition($new_status='', $old_status='', $post='') {
           global $post_ID; // Using the post id from global reference since it is not available in $post object. Strange!
       ```
   
 * I think the reason for this is that you are using
 *     ```
       add_action('transition_post_status', 'apt_check_required_transition');
       ```
   
 * instead of
 *     ```
       add_action('transition_post_status', 'apt_check_required_transition', 10, 3);
       ```
   
 * to activate it, so the input parameters `$old_status` and `$post` are empty in
   your case.
 * cheers
 * [http://wordpress.org/extend/plugins/auto-post-thumbnail/](http://wordpress.org/extend/plugins/auto-post-thumbnail/)

Viewing 1 replies (of 1 total)

 *  [tariquesani](https://wordpress.org/support/users/tariquesani/)
 * (@tariquesani)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/a-remark-on-a-code-comment/#post-3864652)
 * Version 3.3.3 incorporates this – thanks

Viewing 1 replies (of 1 total)

The topic ‘a remark on a code comment’ is closed to new replies.

 * ![](https://ps.w.org/auto-post-thumbnail/assets/icon-256x256.gif?rev=3469511)
 * [Auto Featured Image (Auto Post Thumbnail)](https://wordpress.org/plugins/auto-post-thumbnail/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/auto-post-thumbnail/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/auto-post-thumbnail/)
 * [Active Topics](https://wordpress.org/support/plugin/auto-post-thumbnail/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/auto-post-thumbnail/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/auto-post-thumbnail/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [tariquesani](https://wordpress.org/support/users/tariquesani/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/a-remark-on-a-code-comment/#post-3864652)
 * Status: resolved