SlideShare a Scribd company logo
1 of 10
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/

More Related Content

Similar to Common WordPress APIs - Options API

PHP compatibility testing with PHPCompatibilityWP
PHP compatibility testing with PHPCompatibilityWPPHP compatibility testing with PHPCompatibilityWP
PHP compatibility testing with PHPCompatibilityWPJonathan Bossenger
 
Testing WordPress 6.3 - Developer edition
Testing WordPress 6.3 - Developer editionTesting WordPress 6.3 - Developer edition
Testing WordPress 6.3 - Developer editionJonathan Bossenger
 
What’s new for developers_ (August 2023).pptx
What’s new for developers_ (August 2023).pptxWhat’s new for developers_ (August 2023).pptx
What’s new for developers_ (August 2023).pptxJonathan Bossenger
 
Help test WordPress - developer edition
Help test WordPress - developer editionHelp test WordPress - developer edition
Help test WordPress - developer editionJonathan Bossenger
 
Let's code: WordPress multisite experiments
Let's code: WordPress multisite experimentsLet's code: WordPress multisite experiments
Let's code: WordPress multisite experimentsJonathan Bossenger
 
Let's code: custom content & custom capabilities
Let's code: custom content & custom capabilitiesLet's code: custom content & custom capabilities
Let's code: custom content & custom capabilitiesJonathan Bossenger
 
Let's code: developing WordPress User Roles and Capabilities
Let's code: developing WordPress User Roles and CapabilitiesLet's code: developing WordPress User Roles and Capabilities
Let's code: developing WordPress User Roles and CapabilitiesJonathan Bossenger
 
Let's code! What Happens When You Make Theme Changes
Let's code! What Happens When You Make Theme ChangesLet's code! What Happens When You Make Theme Changes
Let's code! What Happens When You Make Theme ChangesJonathan Bossenger
 
Preventing Common Security Vulnerabilities
Preventing Common Security VulnerabilitiesPreventing Common Security Vulnerabilities
Preventing Common Security VulnerabilitiesJonathan Bossenger
 
Using Block Patterns in your Block Theme.pptx
Using Block Patterns in your Block Theme.pptxUsing Block Patterns in your Block Theme.pptx
Using Block Patterns in your Block Theme.pptxJonathan Bossenger
 
Preventing CSRF Security Vulnerabilities.pptx
Preventing CSRF Security Vulnerabilities.pptxPreventing CSRF Security Vulnerabilities.pptx
Preventing CSRF Security Vulnerabilities.pptxJonathan Bossenger
 
Creating a WordPress multisite network
Creating a WordPress multisite networkCreating a WordPress multisite network
Creating a WordPress multisite networkJonathan Bossenger
 
Let's code: extending the WP REST API - modifying responses
Let's code: extending the WP REST API - modifying responsesLet's code: extending the WP REST API - modifying responses
Let's code: extending the WP REST API - modifying responsesJonathan Bossenger
 

Similar to Common WordPress APIs - Options API (20)

Custom Tables in WordPress
Custom Tables in WordPressCustom Tables in WordPress
Custom Tables in WordPress
 
PHP compatibility testing with PHPCompatibilityWP
PHP compatibility testing with PHPCompatibilityWPPHP compatibility testing with PHPCompatibilityWP
PHP compatibility testing with PHPCompatibilityWP
 
Testing WordPress 6.3 - Developer edition
Testing WordPress 6.3 - Developer editionTesting WordPress 6.3 - Developer edition
Testing WordPress 6.3 - Developer edition
 
The WordPress HTML API
The WordPress HTML APIThe WordPress HTML API
The WordPress HTML API
 
What’s new for developers_ (August 2023).pptx
What’s new for developers_ (August 2023).pptxWhat’s new for developers_ (August 2023).pptx
What’s new for developers_ (August 2023).pptx
 
The WordPress Database
The WordPress DatabaseThe WordPress Database
The WordPress Database
 
Help test WordPress - developer edition
Help test WordPress - developer editionHelp test WordPress - developer edition
Help test WordPress - developer edition
 
Debugging in WordPress
Debugging in WordPressDebugging in WordPress
Debugging in WordPress
 
Testing plugins for PHP 8
Testing plugins for PHP 8Testing plugins for PHP 8
Testing plugins for PHP 8
 
Let's code: WordPress multisite experiments
Let's code: WordPress multisite experimentsLet's code: WordPress multisite experiments
Let's code: WordPress multisite experiments
 
Let's code: custom content & custom capabilities
Let's code: custom content & custom capabilitiesLet's code: custom content & custom capabilities
Let's code: custom content & custom capabilities
 
Let's code: developing WordPress User Roles and Capabilities
Let's code: developing WordPress User Roles and CapabilitiesLet's code: developing WordPress User Roles and Capabilities
Let's code: developing WordPress User Roles and Capabilities
 
Developing for multisite
Developing for multisiteDeveloping for multisite
Developing for multisite
 
Let's code! What Happens When You Make Theme Changes
Let's code! What Happens When You Make Theme ChangesLet's code! What Happens When You Make Theme Changes
Let's code! What Happens When You Make Theme Changes
 
Preventing Common Security Vulnerabilities
Preventing Common Security VulnerabilitiesPreventing Common Security Vulnerabilities
Preventing Common Security Vulnerabilities
 
Using Block Patterns in your Block Theme.pptx
Using Block Patterns in your Block Theme.pptxUsing Block Patterns in your Block Theme.pptx
Using Block Patterns in your Block Theme.pptx
 
Preventing CSRF Security Vulnerabilities.pptx
Preventing CSRF Security Vulnerabilities.pptxPreventing CSRF Security Vulnerabilities.pptx
Preventing CSRF Security Vulnerabilities.pptx
 
Creating a WordPress multisite network
Creating a WordPress multisite networkCreating a WordPress multisite network
Creating a WordPress multisite network
 
WordPress Plugin Security
WordPress Plugin SecurityWordPress Plugin Security
WordPress Plugin Security
 
Let's code: extending the WP REST API - modifying responses
Let's code: extending the WP REST API - modifying responsesLet's code: extending the WP REST API - modifying responses
Let's code: extending the WP REST API - modifying responses
 

More from Jonathan Bossenger

Common WordPress APIs_ HTTP API.pptx
Common WordPress APIs_ HTTP API.pptxCommon WordPress APIs_ HTTP API.pptx
Common WordPress APIs_ HTTP API.pptxJonathan Bossenger
 
Testing your plugins for PHP version compatibility
Testing your plugins for PHP version compatibilityTesting your plugins for PHP version compatibility
Testing your plugins for PHP version compatibilityJonathan Bossenger
 
Managing a WordPress Multisite Network
Managing a WordPress Multisite NetworkManaging a WordPress Multisite Network
Managing a WordPress Multisite NetworkJonathan Bossenger
 
Introduction to WordPress Multisite Networks
Introduction to WordPress Multisite NetworksIntroduction to WordPress Multisite Networks
Introduction to WordPress Multisite NetworksJonathan Bossenger
 
Custom Post Types and Capabilities.pptx
Custom Post Types and Capabilities.pptxCustom Post Types and Capabilities.pptx
Custom Post Types and Capabilities.pptxJonathan Bossenger
 
Developing WordPress User Roles and Capabilities
Developing WordPress User Roles and CapabilitiesDeveloping WordPress User Roles and Capabilities
Developing WordPress User Roles and CapabilitiesJonathan Bossenger
 
Extending WordPress: common security vulnerabilities
Extending WordPress: common security vulnerabilitiesExtending WordPress: common security vulnerabilities
Extending WordPress: common security vulnerabilitiesJonathan Bossenger
 
WP REST API - custom routes and endpoints
WP REST API - custom routes and endpointsWP REST API - custom routes and endpoints
WP REST API - custom routes and endpointsJonathan Bossenger
 
WP REST API - modifying responses
WP REST API - modifying responsesWP REST API - modifying responses
WP REST API - modifying responsesJonathan Bossenger
 

More from Jonathan Bossenger (10)

Common WordPress APIs_ HTTP API.pptx
Common WordPress APIs_ HTTP API.pptxCommon WordPress APIs_ HTTP API.pptx
Common WordPress APIs_ HTTP API.pptx
 
Testing your plugins for PHP version compatibility
Testing your plugins for PHP version compatibilityTesting your plugins for PHP version compatibility
Testing your plugins for PHP version compatibility
 
WordPress Coding Standards
WordPress Coding StandardsWordPress Coding Standards
WordPress Coding Standards
 
Managing a WordPress Multisite Network
Managing a WordPress Multisite NetworkManaging a WordPress Multisite Network
Managing a WordPress Multisite Network
 
Introduction to WordPress Multisite Networks
Introduction to WordPress Multisite NetworksIntroduction to WordPress Multisite Networks
Introduction to WordPress Multisite Networks
 
Custom Post Types and Capabilities.pptx
Custom Post Types and Capabilities.pptxCustom Post Types and Capabilities.pptx
Custom Post Types and Capabilities.pptx
 
Developing WordPress User Roles and Capabilities
Developing WordPress User Roles and CapabilitiesDeveloping WordPress User Roles and Capabilities
Developing WordPress User Roles and Capabilities
 
Extending WordPress: common security vulnerabilities
Extending WordPress: common security vulnerabilitiesExtending WordPress: common security vulnerabilities
Extending WordPress: common security vulnerabilities
 
WP REST API - custom routes and endpoints
WP REST API - custom routes and endpointsWP REST API - custom routes and endpoints
WP REST API - custom routes and endpoints
 
WP REST API - modifying responses
WP REST API - modifying responsesWP REST API - modifying responses
WP REST API - modifying responses
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

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/