Common WordPress APIs - Options API

Jonathan Bossenger
Jonathan BossengerCode instructor/ex-developer um Automattic
1
Common WordPress APIs:
Options API
Jonathan Bossenger
Learn.WordPress.org
2
👋🏽 Welcome!
As you join, let everyone know in the chat where you’re
joining us from, and feel free to share a little about what
you do with WordPress.
Hello!
○ My name is Jonathan Bossenger
○ From Cape Town, South Africa
○ Developer educator at Automattic
○ Sponsored to work with the Training Team
○ jonathanbossenger.com
Learn.WordPress.org
Options API
Jonathan Bossenger
Announcements
○ Welcome and thanks 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.
Announcements
○ Make sure your local install is ready
○ If I am going too fast, please let me know!
○ We are recording this session and will be posting it to https://wordpress.tv/ afterwards.
○ https://learn.wordpress.org/ - WordPress learning resources
○ https://developer.wordpress.org/news/ - WordPress developer news
Learning outcomes
○ The Options API
• What is the Options API?
• What should the Options API be used for?
• How to use the Options API
• Data Types
• Protected Options
• Permissions
Question time
○ On a scale of 1 to 5, how well do you know this topic?
Requirements
○ A local WordPress installation
○ A text editor
○ A way to access your WP database
• https://wordpress.org/plugins/sql-buddy/
○ A file to test Options API function calls
• https://gist.github.com/jonathanbossenger/d96520acd6225ea969f091752a3bca8b
Let’s go!
Resources
○ https://wordpress.org/plugins/sql-buddy/
○ https://gist.github.com/jonathanbossenger/d96520acd6225ea969f091752a3bca8b
○ https://developer.wordpress.org/apis/options/
○ https://developer.wordpress.org/reference/functions/wp_load_alloptions/
○ https://learn.wordpress.org/tutorial/developing-with-user-roles-and-capabilities/
1 von 10

Más contenido relacionado

Similar a Common WordPress APIs - Options API(20)

Testing WordPress 6.3 - Developer editionTesting WordPress 6.3 - Developer edition
Testing WordPress 6.3 - Developer edition
Jonathan Bossenger23 views
The WordPress HTML APIThe WordPress HTML API
The WordPress HTML API
Jonathan Bossenger41 views
The WordPress Request LifecycleThe WordPress Request Lifecycle
The WordPress Request Lifecycle
Jonathan Bossenger32 views
The WordPress DatabaseThe WordPress Database
The WordPress Database
Jonathan Bossenger52 views
Help test WordPress - developer editionHelp test WordPress - developer edition
Help test WordPress - developer edition
Jonathan Bossenger34 views
Debugging in WordPressDebugging in WordPress
Debugging in WordPress
Jonathan Bossenger20 views
Testing plugins for PHP 8Testing plugins for PHP 8
Testing plugins for PHP 8
Jonathan Bossenger45 views
Let's code: WordPress multisite experimentsLet's code: WordPress multisite experiments
Let's code: WordPress multisite experiments
Jonathan Bossenger14 views
Developing for multisiteDeveloping for multisite
Developing for multisite
Jonathan Bossenger107 views
Preventing Common Security VulnerabilitiesPreventing Common Security Vulnerabilities
Preventing Common Security Vulnerabilities
Jonathan Bossenger47 views
Creating a WordPress multisite networkCreating a WordPress multisite network
Creating a WordPress multisite network
Jonathan Bossenger49 views
WordPress Plugin SecurityWordPress Plugin Security
WordPress Plugin Security
Jonathan Bossenger82 views

Más de Jonathan Bossenger(10)

Common WordPress APIs_ HTTP API.pptxCommon WordPress APIs_ HTTP API.pptx
Common WordPress APIs_ HTTP API.pptx
Jonathan Bossenger19 views
WordPress Coding StandardsWordPress Coding Standards
WordPress Coding Standards
Jonathan Bossenger116 views
Managing a WordPress Multisite NetworkManaging a WordPress Multisite Network
Managing a WordPress Multisite Network
Jonathan Bossenger12 views
Custom Post Types and Capabilities.pptxCustom Post Types and Capabilities.pptx
Custom Post Types and Capabilities.pptx
Jonathan Bossenger25 views
WP REST API - custom routes and endpointsWP REST API - custom routes and endpoints
WP REST API - custom routes and endpoints
Jonathan Bossenger31 views
WP REST API - modifying responsesWP REST API - modifying responses
WP REST API - modifying responses
Jonathan Bossenger13 views

Último(20)

METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation23 views
ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web Developers
Maximiliano Firtman152 views
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)
CSUC - Consorci de Serveis Universitaris de Catalunya51 views
Green Leaf Consulting: Capabilities DeckGreen Leaf Consulting: Capabilities Deck
Green Leaf Consulting: Capabilities Deck
GreenLeafConsulting170 views

Common WordPress APIs - Options API

  • 1. 1 Common WordPress APIs: Options API Jonathan Bossenger Learn.WordPress.org
  • 2. 2 👋🏽 Welcome! As you join, let everyone know in the chat where you’re joining us from, and feel free to share a little about what you do with WordPress. Hello! ○ My name is Jonathan Bossenger ○ From Cape Town, South Africa ○ Developer educator at Automattic ○ Sponsored to work with the Training Team ○ jonathanbossenger.com
  • 4. Announcements ○ Welcome and thanks 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 ○ If I am going too fast, please let me know! ○ We are recording this session and will be posting it to https://wordpress.tv/ afterwards. ○ https://learn.wordpress.org/ - WordPress learning resources ○ https://developer.wordpress.org/news/ - WordPress developer news
  • 6. Learning outcomes ○ The Options API • What is the Options API? • What should the Options API be used for? • How to use the Options API • Data Types • Protected Options • Permissions
  • 7. Question time ○ On a scale of 1 to 5, how well do you know this topic?
  • 8. Requirements ○ A local WordPress installation ○ A text editor ○ A way to access your WP database • https://wordpress.org/plugins/sql-buddy/ ○ A file to test Options API function calls • https://gist.github.com/jonathanbossenger/d96520acd6225ea969f091752a3bca8b
  • 10. Resources ○ https://wordpress.org/plugins/sql-buddy/ ○ https://gist.github.com/jonathanbossenger/d96520acd6225ea969f091752a3bca8b ○ https://developer.wordpress.org/apis/options/ ○ https://developer.wordpress.org/reference/functions/wp_load_alloptions/ ○ https://learn.wordpress.org/tutorial/developing-with-user-roles-and-capabilities/