Embed presentation
Download to read offline









![WP Action
<?php
do_action( ‘init’);
<?php
function wporg_custom() {
// do something
}
add_action('init', 'wporg_custom');
add_action ( 'hook_name', 'your_function_name', [priority], [accepted_args] );
Examples:](https://image.slidesharecdn.com/hookingwithwordpress-coep-march2019-190402062009/85/Hooking-with-WordPress-by-Rahul-Prajapati-COEP-FOSSMeet-March-2019-10-320.jpg)
![WP Filters
<?php
$title = apply_filter( ‘the_title’, $title );
<?php
function wporg_filter_title($title) {
return 'The ' . $title . ' was filtered';
}
add_filter('the_title', 'wporg_filter_title');
add_filter ( 'hook_name', 'your_filter', [priority], [accepted_args] );
Examples:](https://image.slidesharecdn.com/hookingwithwordpress-coep-march2019-190402062009/85/Hooking-with-WordPress-by-Rahul-Prajapati-COEP-FOSSMeet-March-2019-11-320.jpg)




The document describes hooking in WordPress, focusing on actions and filters that allow modification of function behavior during execution. It provides PHP code examples for the implementation of hooks and describes the roles of source modification and runtime modification. Additional resources and references for further understanding of WordPress hooks are also included.









![WP Action
<?php
do_action( ‘init’);
<?php
function wporg_custom() {
// do something
}
add_action('init', 'wporg_custom');
add_action ( 'hook_name', 'your_function_name', [priority], [accepted_args] );
Examples:](https://image.slidesharecdn.com/hookingwithwordpress-coep-march2019-190402062009/85/Hooking-with-WordPress-by-Rahul-Prajapati-COEP-FOSSMeet-March-2019-10-320.jpg)
![WP Filters
<?php
$title = apply_filter( ‘the_title’, $title );
<?php
function wporg_filter_title($title) {
return 'The ' . $title . ' was filtered';
}
add_filter('the_title', 'wporg_filter_title');
add_filter ( 'hook_name', 'your_filter', [priority], [accepted_args] );
Examples:](https://image.slidesharecdn.com/hookingwithwordpress-coep-march2019-190402062009/85/Hooking-with-WordPress-by-Rahul-Prajapati-COEP-FOSSMeet-March-2019-11-320.jpg)


