Publicidad
Publicidad

Más contenido relacionado

Publicidad

Let's code: custom content & custom capabilities

  1. Jonathan Bossenger Let’s Code: Learn.WordPress.org Custom content & custom capabilities
  2. 2 👋🏽 Welcome! As you join, please make sure you have your local development environment ready: • A local WordPress installation • A code editor like VSCode or Sublime • The test bed plugin • https://github.com/jonathanbossenger/wp- learn-roles- capabilities/releases/download/1.0.2/wp-learn- roles-capabilities.1.0.2.zip Then, let everyone know in the chat where you’re joining us from… Hello! ○ My name is Jonathan Bossenger ○ From Cape Town, South Africa ○ Developer educator at Automattic ○ Sponsored to work with the Training Team ○ jonathanbossenger.com
  3. Learn.WordPress.org Let's code! Custom content & custom capabilities Jonathan Bossenger
  4. Announcements ○ Welcome, and thank you to Tracy for co-hosting. ○ Please let me know if you can’t see this slide! ○ We are presenting in focus mode, but please feel free to enable your video. ○ You are welcome to ask questions. ○ You are welcome to post questions in the chat, or unmute to ask questions.
  5. Announcements ○ Make sure your local install is ready ○ https://github.com/jonathanbossenger/wp-learn-roles- capabilities/releases/download/1.0.2/wp-learn-roles-capabilities.1.0.2.zip ○ If I am going too fast, please let me know! ○ We will be posting this session to https://wordpress.tv/ afterwards ○ For more WordPress focused content please visit https://learn.wordpress.org/
  6. Learning Outcomes 1. How custom capabilities work on custom post types. 2. The capability_argument of register_post_type. 3. The capabilities argument of register_post_type. 4. The map_meta_cap argument of register_post_type.
  7. Objectives 1. Setup and review the test bed plugin 2. Create a custom post type story 3. Create a role “writer” to manage their own stories by: a. Setting the capability_type argument b. Setting the capabilities argument c. Setting the map_meta_cap argument 7
  8. 8 Let’s code.
  9. Resources ○ https://github.com/jonathanbossenger/wp-learn-roles-capabilities/releases/download/1.0.2/wp-learn- roles-capabilities.1.0.2.zip ○ https://developer.wordpress.org/plugins/users/roles-and-capabilities/ ○ https://wordpress.org/documentation/article/roles-and-capabilities/ ○ https://developer.wordpress.org/reference/functions/register_post_type/ ○ https://developer.wordpress.org/reference/functions/map_meta_cap/

Notas del editor

  1. TITLE SLIDE: Make a copy of this presentation to your Google Drive, and edit to replace with your details.
Publicidad