Brad Williams, the co-author of Professional WordPress Plugin Development, gives his presentation on Intro to WordPress Plugin Development to the NYC WordPress Meetup group in March 2011.
A Hacker's perspective on AEM applications securityMikhail Egorov
Adobe Experience Manager (AEM), is a comprehensive content management solution for building websites, managing marketing content and assets. I started to look into AEM security back in 2015. Since then I discovered and reported several server-side vulnerabilities and developed toolset for AEM hacking to automate security testing of AEM web-applications.
In 2019 I reported one code injection and three XML external entity (XXE) vulnerabilities to Adobe PSIRT. They are known as CVE-2019-8086, CVE-2019-8087, CVE-2019-8088. These vulnerabilities allow anonymous attackers to compromise AEM web-application.
In the talk, I will disclose details of discovered vulnerabilities and exploitation techniques.
A presentation from 4/8/09 for my graduate Industrial Training class at University of Memphis. Covers the basics of Wordpress, installation, plugins, themes, and video.
A Hacker's perspective on AEM applications securityMikhail Egorov
Adobe Experience Manager (AEM), is a comprehensive content management solution for building websites, managing marketing content and assets. I started to look into AEM security back in 2015. Since then I discovered and reported several server-side vulnerabilities and developed toolset for AEM hacking to automate security testing of AEM web-applications.
In 2019 I reported one code injection and three XML external entity (XXE) vulnerabilities to Adobe PSIRT. They are known as CVE-2019-8086, CVE-2019-8087, CVE-2019-8088. These vulnerabilities allow anonymous attackers to compromise AEM web-application.
In the talk, I will disclose details of discovered vulnerabilities and exploitation techniques.
A presentation from 4/8/09 for my graduate Industrial Training class at University of Memphis. Covers the basics of Wordpress, installation, plugins, themes, and video.
What is JavaScript?
JavaScript is a very powerful client-side scripting language. JavaScript is used mainly for enhancing the interaction of a user with the webpage. In other words, you can make your webpage more lively and interactive, with the help of JavaScript. JavaScript is also being used widely in game development and Mobile application development.
Vue comes with a simple and minimalistic core that is perfect for simple, single page applications that don't require heavy overheads. Vue works primarily on the ViewModel with two-way data bindings and is designed to be simple and flexible, allowing developers to mold the layer as they see fit.
The first deck of a two part learning deck about TypeScript.
Here you can view a first introduction to the language and some attention call for some of TypeScript detailes.
The most massive crime of identity theft in history was perpetrated in 2007 by exploiting an SQL Injection vulnerability. This issue is one of the most common and most serious threats to web application security. In this presentation, you'll see some common myths busted and you'll get a better understanding of defending against SQL injection.
JavaScript Events:
HTML events are "things" that happen to HTML elements. When JavaScript is used in HTML pages, JavaScript can "react" on these events.
What can JavaScript Do?
Event handlers can be used to handle, and verify, user input, user actions, and browser actions:
Things that should be done every time a page loads
Things that should be done when the page is closed
Action that should be performed when a user clicks a button
Content that should be verified when a user inputs data
PHP stands for “PHP: Hypertext Preprocessor”. It is very good for creating dynamic content. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
Some security problems can be eliminated by using web components, others at least reduced, but you have to take specific actions or you won't get the benefits.
Spring boot is a great and relatively a new project from Spring.io. The presentation discusses about basics of spring boot to advance topics. Sample demo apps are available here : https://github.com/bhagwat/spring-boot-samples
This Edureka "Node.js Express tutorial" will help you to learn the Node.js express fundamentals with examples. Express.js is flexible and minimal node.js web application framework that provides robust set of features to develop mobile and web applications. It facilitates the rapid development of node.js applications. Below are the topics covered in this tutorial:
1) Why Express.js?
2) What is Express.js?
3) Express Installation
4) Express Routes
5) Express Middlewares
What is JavaScript?
JavaScript is a very powerful client-side scripting language. JavaScript is used mainly for enhancing the interaction of a user with the webpage. In other words, you can make your webpage more lively and interactive, with the help of JavaScript. JavaScript is also being used widely in game development and Mobile application development.
Vue comes with a simple and minimalistic core that is perfect for simple, single page applications that don't require heavy overheads. Vue works primarily on the ViewModel with two-way data bindings and is designed to be simple and flexible, allowing developers to mold the layer as they see fit.
The first deck of a two part learning deck about TypeScript.
Here you can view a first introduction to the language and some attention call for some of TypeScript detailes.
The most massive crime of identity theft in history was perpetrated in 2007 by exploiting an SQL Injection vulnerability. This issue is one of the most common and most serious threats to web application security. In this presentation, you'll see some common myths busted and you'll get a better understanding of defending against SQL injection.
JavaScript Events:
HTML events are "things" that happen to HTML elements. When JavaScript is used in HTML pages, JavaScript can "react" on these events.
What can JavaScript Do?
Event handlers can be used to handle, and verify, user input, user actions, and browser actions:
Things that should be done every time a page loads
Things that should be done when the page is closed
Action that should be performed when a user clicks a button
Content that should be verified when a user inputs data
PHP stands for “PHP: Hypertext Preprocessor”. It is very good for creating dynamic content. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
Some security problems can be eliminated by using web components, others at least reduced, but you have to take specific actions or you won't get the benefits.
Spring boot is a great and relatively a new project from Spring.io. The presentation discusses about basics of spring boot to advance topics. Sample demo apps are available here : https://github.com/bhagwat/spring-boot-samples
This Edureka "Node.js Express tutorial" will help you to learn the Node.js express fundamentals with examples. Express.js is flexible and minimal node.js web application framework that provides robust set of features to develop mobile and web applications. It facilitates the rapid development of node.js applications. Below are the topics covered in this tutorial:
1) Why Express.js?
2) What is Express.js?
3) Express Installation
4) Express Routes
5) Express Middlewares
Presented at WordCamp Malaysia 2010.
Slideshare also does not resize my cropped images properly, thus resulting in squished images. This is noticeable on my squished code.
These are the presentation slides from the WordPress GTA Meetup presentation Hooking with WordPress: WordPress Plugins 103 as used on November 19, 2012
Presented at WordCamp Montreal 2017
For many WordPress users, even seasoned PHP developers, creating new plugins for WordPress seems like a daunting task. This presentation aims to show attendees how simple creating plugins for WordPress from the ground up can be by looking at the architecture of a WordPress plugin, from the basic concepts of registering actions and filters to more advanced concepts such as the creation of admin pages and registering shortcodes.
Word press Plugins by WordPress ExpertsYameen Khan
A plugin in WordPress is a PHP script that extends or alters the core functionality of
WordPress. Quite simply plugins are files installed in WordPress to add a feature, or set of features, to WordPress
Plugin provides a set of hooks that enable plugins access to specific parts of WordPress. WordPress contains two different types of hooks: Actions and Filters. The Action hook enables you to trigger custom plugin code at specific points during execution. For example, you can trigger a custom function to run after a user registers a user account in WordPress.
The Filter hook to modifies text before adding or after retrieving from the database.
How to improve your workflows via SSH gateway. Experts at WP Engine help you learn about how WordPress developers can make their work more efficient using WP-CLI via SSH gateway to improve workflows.
On-demand webinar: https://hs.wpengine.com/webinar-improve-workflows-SSH-gateway
Writing Secure WordPress Code WordCamp NYC 2014Brad Williams
Learn the proper way to write the most secure code in WordPress. Whether you’re a plugin developer or build themes, it’s extremely important to understand how to secure your code from hacks and exploits. Overlooking some very easy to follow techniques can expose your website to the hackers everywhere. WordPress features a number of built-in methods to help make sure your code is safe and secure, and we’ll cover each and every one in detail.
Learn how to keep your WordPress-powered website secure from hackers and exploits. Brad Williams from WebDevStudios.com shows examples of hacked sites, shares tips and plugins for keeping WordPress secure, and talks about his experiences with WordPress and security.
Spooky WordPress: Disturbingly Brilliant Uses of WPBrad Williams
Brad Williams and Brian Messenlehner, co-founders of WebDevStudios.com, demonstrate interesting and amazing ways you can use WordPress! This is not your standard WordPress showcase presentation. Have you ever seen a WordPress powered iPhone app? How about a Facebook or Open Social app running WordPress? In this presentation you will!
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
2. Who Am I?
Brad Williams
Co-Founder of WebDevStudios.com
Organizer Philly WordPress Meetup
& WordCamp Philly
Co-Author of Professional WordPress
(http://bit.ly/pro-wp)
& Professional WordPress Plugin Development
(http://amzn.to/plugindevbook)
Slides available at: http://www.slideshare.net/williamsba
3. Topics
What is a Plugin?
Types of Plugins
Sanity Practices and Plugin Foundation
Determining Paths in a Plugin
Activation, Deactivation, and Uninstall Methods
Shortcodes, Menus, and Settings Overview
Hooks: Actions and Filters Explained
Resources for Plugin Developers
4. What is a Plugin?
A plugin in WordPress is a PHP script
that extends, or alters, the core
functionality of WordPress.
Quite simply plugins are files installed in
WordPress to add a feature, or set of
features, to WordPress.
5. What is a Plugin?
http://wordpress.org/extend/plugins/
6. Types and Statuses of Plugins
Active – Plugin is active and running in WordPress
Inactive – Plugin is installed but not active. No code from the plugin is
executed
Must-Use – All plugins installed in wp-content/mu-plugins. All plugins
are loaded automatically. Only way to deactivate is to remove.
Drop-ins – Core functionality of WordPress can be replaced by Drop-in
plugins.
advanced-cache-php – Advanced caching plugin
db.php – Custom database class
maintenance.php – Custom maintenance message
sunrise.php – Domain mapping
And more…
7. Plugin Header Requirements
<?php
/*
Plugin Name: WordPress NYC Meetup
Plugin URI: http://webdevstudios.com/support/wordpress-plugins/
Description: Plugin for the WordPress NYC Meetup
Version: 1.0
Author: Brad Williams
Author URI: http://webdevstudios.com
License: GPLv2
*/
?>
Plugin is now available to be
activated in WordPress!
8. Sanity Practices
Prefix Everything!
update_option() //BAD FUNCTION NAME
bw_nycmeetup_update_option() //GOOD FUNCTION NAME!
$settings //BAD VARIABLE NAME
$bw_nycmeetup_settings //GOOD VARIABLE NAME!
Organized Folder Structure
• /unique-plugin-name
• unique-plugin-name.php Keeping your files organized
• uninstall.php using a clean folder structure can
• /js make it much easier to track the
• /css flow of your plugin over time.
• /includes
• /images
9. Determining Paths
Local Paths
<?php
//display local path to my plugin directory
echo plugin_dir_path( __FILE__ );
?>
Would display: /public_html/wp-content/plugins/my-new-plugin/
<?php
//display local path to my includes/functions.php file
echo plugin_dir_path( __FILE__ ) .’includes/functions.php’;
?>
Would display: /public_html/wp-content/plugins/my-new-plugin/includes/functions.php
__FILE__ is a “magical” PHP
constant containing the full path
and filename of the file
10. Determining Paths
URL Paths
<?php
//display the URL to images/icon.png
echo plugins_url( 'images/icon.png', __FILE__ );
?>
Would display: http://example.com/wp-content/plugins/my-new-plugin/images/icon.png
Advantages of plugins_url()
• Supports the mu-plugins directory
• Auto detects SSL, so if enabled the URL would return https
• Uses the WP_PLUGIN_URL constant, meaning it can detect the correct path even if
/wp-content has been moved
• Supports Multisite using the WPMU_PLUGIN_URL constant
Plugin is now available to be
activated in WordPress!
11. Important Techniques
Plugin Activation Function
<?php
register_activation_hook( __FILE__, 'bw_nycmeetup_install' );
function bw_nycmeetup_install() {
If ( version_compare( get_bloginfo( 'version' ), ‘4.0', '<' ) ) {
deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate our plugin
wp_die( 'This plugin requires WordPress version 4.0 or higher.' );
}
}
?>
register_activation_hook( $file, $function )
Parameters:
• $file (string) (required) – Path to the primary plugin file
• $function (string) (required) – Function to be executed when plugin is
activated
http://codex.wordpress.org/Function_Reference/register_activation_hook
12. Important Techniques
Plugin Deactivation Function
<?php
register_deactivation_hook( __FILE__, 'bw_nycmeetup_deactivate' );
function bw_nycmeetup_deactivate() {
//do stuff
}?>
register_deactivation_hook( $file, $function )
Parameters:
• $file (string) (required) – Path to the primary plugin file
• $function (string) (required) – Function to be executed when plugin is
deactivated
REMEMBER: Deactivating is NOT uninstalling. Always
assume your users will reactivate at a later date.
http://codex.wordpress.org/Function_Reference/register_deactivation_hook
13. Important Techniques
Plugin Uninstall
1. Create a uninstall.php file in the root directory of your plugin
2. Add all uninstall code to this file
<?php
if( !defined( 'WP_UNINSTALL_PLUGIN' ) )
exit ();
// Delete option from options table
delete_option( ‘bw_nycmeetup_options' );
?>
If the WP_UNINSTALL_PLUGIN constant is not
defined we know WordPress did not call this file.
This is a security measure in WordPress
Uninstall.php is the recommended uninstall method, but
there is another method called register_uninstall_hook()
http://jacobsantos.com/2008/general/wordpress-27-plugin-uninstall-methods/
14. What is a Hook?
Hooks enable plugin developers to “hook”
into WordPress and change how it works
without modifying the core code
There are two kinds of hooks: Actions and Filters
http://jacobsantos.com/2008/general/wordpress-27-plugin-uninstall-methods/
15. Hooks
Action Hooks
Enables you to execute a function at specific points in the WordPress loading process
<?php
add_action( 'user_register', 'bw_nycmeetup_welcome_email' );
function bw_nycmeetup_welcome_email( $user_id ) {
$user_info = get_userdata( $user_id );
//populate email values
$email_to = is_email( $user_info->user_email );
$email_subject = 'Welcome!';
$email_msg = 'Thank you for registering on my website!';
//send welcome email
wp_mail( $email_to, $email_subject, $email_msg );
}
?>
http://codex.wordpress.org/Plugin_API/Action_Reference
16. Hooks
Common Action Hooks
• plugins_loaded – Earliest hook in the WP loading process, after all plugins have
been loaded
• init – Fire after most of WP is set up so all information is available
admin_menu – Runs when the basic admin menu structure is in place
• template_redirect – Executed just before the theme template is chosen
• wp_head – Executed on the front end of WordPress between the <head> tags
• wp_footer – Runs in the footer of your theme
• admin_head – Executed on the admin side of WordPress between the <head>
tags
• admin_footer – Runs in the footer of the admin side of WordPress
• user_register – Executes when a new user account is created
• save_post – Runs when a post or page is created or updated
http://codex.wordpress.org/Plugin_API/Action_Reference
17. Hooks
Filter Hooks
Enables you to manipulate the output of code and content in WordPress
<?php
add_filter( 'the_content', 'bw_nycmeetup_filter_content' );
function bw_nycmeetup_filter_content( $text ) {
$text = str_replace( 'Drupal', 'WordPress', $text );
return $text;
}
?>
Change every instance of Drupal to WordPress in your content >:)
REMEMBER: Using a filter does NOT change the
content in the database, it simply alters it prior to
displaying
http://codex.wordpress.org/Plugin_API/Filter_Reference
19. Hooks
Common Filter Hooks
• the_content – Filter applied to the content of the post or page
• the_title – Applied to the post title
• body_class – Applied to the <body> tag class parameter
• default_content – Applied to the content on a new post or page
• comment_text – Applied to the comment text of a comment
http://codex.wordpress.org/Plugin_API/Filter_Reference
23. Shortcode Example
Example
<?php
// Register a new shortcode: [book]
add_shortcode( 'book', 'bw_nycmeetup_book' );
// The callback function that will replace [book]
function bw_nycmeetup_book() {
return '<a href="http://amzn.to/plugindevbook">Professional WordPress Plugin
Development</a>';
}
?>
24. Menu Example
Example Custom Menu
<?php
add_action( 'admin_menu', 'bw_nycmeetup_create_menu' );
function bw_nycmeetup_create_menu() {
//create custom top-level menu
add_menu_page( 'NYC Meetup Settings Page', 'NYC Meetup',
'manage_options', 'nyc-meetup-plugin', 'bw_nycmeetup_settings_page' );
//create submenu items
add_submenu_page( 'nyc-meetup-plugin', 'About My Plugin', 'About',
'manage_options', 'nyc-meetup-plugin_about', 'bw_nycmeetup_about_page' );
add_submenu_page( 'nyc-meetup-plugin', 'Help with My Plugin', 'Help',
'manage_options', 'nyc-meetup-plugin_help', 'bw_nycmeetup_help_page' );
add_submenu_page( 'nyc-meetup-plugin', 'Uinstall My Plugin', 'Uninstall',
'manage_options', 'nyc-meetup-plugin_uninstall', 'bw_nycmeetup_uninstall_page' );
}
?>
25. Menu Example
add_menu_page()
Parameters:
$page_title – The title tag text
$menu_title – The menu name
$capability - Capability required to view menu
$menu_slug – Unique slug to reference menu by
$function – Function that displays the pages content
$icon_url – URL for a custom menu icon
$position – Position the menu should appear
add_submenu_page()
Parameters:
$parent_slug – Slug name for the parent menu
$page_title – The title tag text
$menu_title – The submenu name
$capability – Capability required to view submenu
$menu_slug – Unique slug to reference menu by
$function – Function that displays the pages content
26. Menu Example
Add Submenu to Custom Post Type
<?php
add_action( 'admin_menu', 'bw_nycmeetup_create_menu' );
function bw_nycmeetup_create_menu() {
//create submenu items
add_submenu_page( 'edit.php?post_type=movies', 'About My Plugin', 'About',
'manage_options', 'nyc-meetup-plugin_about', 'bw_nycmeetup_about_page' );
}
?>
You can easily add a submenu to any Custom Post
Type menu by setting the $parent_slug to edit.php?
post_type=POSTTYPENAME
27. Menu Example
Add Submenu to Existing Menu
<?php
add_action( 'admin_menu', 'bw_nycmeetup_create_menu' );
function bw_nycmeetup_create_menu() {
//create Settings submenu page
add_options_page('NYC Meetup Settings Page', 'NYC Meetup',
'manage_options', 'nyc-meetup-plugin', 'bw_nycmeetup_settings_page' );
}
function bw_nycmeetup_settings_page() {
//settings page
}
?>
28. Menu Example
add_options_page()
Parameters:
$page_title – The title tag text
$menu_title – The menu name
$capability - Capability required to view menu
$menu_slug – Unique slug to reference menu by
$function – Function that displays the pages content
add_dashboard_page()
add_posts_page()
add_media_page()
add_links_page()
add_pages_page()
add_comments_page()
add_theme_page()
add_plugins_page()
add_users_page()
add_management_page()
add_options_page()
29. Basic Settings Page Example
Register your settings
add_action('admin_init', 'bw_nycmeetup_register_settings');
// WordPress Settings API
function bw_nycmeetup_register_settings(){
register_setting( 'bw_nycmeetup_settings_group', 'bw_nycmeetup_settings',
'bw_nycmeetup_settings_validate' );
}
register_setting()
Parameters:
$option_group – A unique settings group name
$option_name – A unique option name for the group
$sanitize_callback – Callback function to sanitize the option's
values
30. Menu Example
add_menu_page()
Parameters:
$page_title – The title tag text
$menu_title – The menu name
$capability - Capability required to view menu
$menu_slug – Unique slug to reference menu by
$function – Function that displays the pages content
$icon_url – URL for a custom menu icon
$position – Position the menu should appear
add_submenu_page()
Parameters:
$parent_slug – Slug name for the parent menu
$page_title – The title tag text
$menu_title – The submenu name
$capability – Capability required to view submenu
$menu_slug – Unique slug to reference menu by
$function – Function that displays the pages content