I spy

PHP

Operators

https://secure.php.net/manual/en/language.operators.comparison.php

WordPress

Coding standards

https://make.wordpress.org/core/handbook/coding-standards/php/

Actions

https://codex.wordpress.org/Plugin_API#Actions
https://codex.wordpress.org/Function_Reference/add_action
https://codex.wordpress.org/Post_Status_Transitions
https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/post.php#L3944

Classes1

https://codex.wordpress.org/Class_Reference/WP_Post
https://codex.wordpress.org/Class_Reference/WP_User

Functions

https://codex.wordpress.org/Function_Reference/wp_get_current_user
https://codex.wordpress.org/Function_Reference/get_user_by
https://codex.wordpress.org/Function_Reference/wp_mail

Assignment

Create a plugin that emails the author of a published post when someone else trashes it. Bonus points for telling the author who did the dastardly deed.


  1. This is meant to be a first pass at objects and classes, not in-depth exploration. You should be comfortable accessing properties of the WP_Post and WP_User objects. More information on classes and objects can be found here, but this should not be necessary to complete this assignment:
    https://secure.php.net/manual/en/language.oop5.basic.php
    https://secure.php.net/manual/en/language.oop5.properties.php 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.