/WP-post-details-admin-page-plugin

Wordpress plugin - creates an admin page that displays the last 5 posts, number of posts per category and length of time between posts.

Primary LanguagePHP

WP POST DETAILS ADMIN PAGE PLUGIN

NOTE: Work in progress.

NOTE: dbSearchTest.php is just testing out database searches for the finished plugin. (Written in PHP using PDO rather than in Wordpress directly)

This is an open source Wordpress plugin project which allows site owners to see which categories or post types they haven't added to for a while. It aims to make choosing the site owners next post topic easier to choose.

The plugin provides an admin page in the dashboard and on opening the page users can see:

  • The name, category, type and date of their last 5 posts.
  • How many posts they have written in a specific category.
  • How many posts they have for a custom post type.
  • How long it is since they wrote a post for a specific category.
  • Useful statistics to see the posts the user has written.

TOPICS COVERED

  • Creating admin pages for the Wordpress dashboard.
  • WPDB prepare function.
  • WPDB get results function
  • MySQL joins
  • MySQL join 3 tables
  • MySQL COUNT() method
  • MySQL AS alias
  • WP database - querying wp_terms, wp_term_relationships, wp_posts
  • WPDB get row function.
  • PHP form creation.
  • wp_nonce fields and verification
  • Sanitizing strings
  • Escaping HTML output