WP Skillz

WP Skillz

An expert-level WordPress plugin developer skills test

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • Leaderboards
  • Resources

Post navigation

← Previous Next →

Question 1 of 12 (0% complete)

Your plugin enables a new custom post type. What is the best way to ensure that it works with all permalink structures?

  1. Register an activation hook and call register_post_type() and flush_rewrite_rules() on it.

  2. Call register_post_type() and flush_rewrite_rules() on every page load, on an appropriate hook such as 'init'.

  3. Call register_post_type() on every page load, and call flush_rewrite_rules() once on an activation hook.

  4. register_post_type() should handle everything, there's no other action necessary.

This entry was posted by goldenapples. Bookmark the permalink.

User-submitted Links

  1. justintadlock.com Professional WordPress Plugin Development
    | 0 points by goldenapples 403 days ago - No comments yet
  2. codex.wordpress.org Automated Testing « WordPress Codex
    | 2 points by goldenapples 403 days ago - No comments yet
  3. make.wordpress.org Rewrite endpoints API « Make WordPress Plugins
    | 2 points by goldenapples 403 days ago - No comments yet
  4. jumping-duck.com How to Contribute to WordPress Core – Jumping Duck Media
    | 1 points by goldenapples 403 days ago - No comments yet

View current links

Proudly powered by WordPress
Privacy policyTerms of serviceCookiesContact usAbout usFAQArticlesSitemap