Created
December 19, 2016 10:43
-
-
Save jorenvh/737c7ffd096f50881db10f20c804e6c7 to your computer and use it in GitHub Desktop.
WP filters & actions (support windows azure WP plugin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Actions | |
|-------------------------------------------------------------------------- | |
| | |
| Wordpress add_action functions. | |
| | |
| | |
| | |
*/ | |
/** | |
* Add custom post status | |
*/ | |
add_action( 'init', 'my_custom_post_status' ); | |
/** | |
* Load extra scripts | |
*/ | |
add_action( 'wp_enqueue_scripts', 'mh_load_my_script' ); | |
/** | |
* Add custom js for admin theme | |
*/ | |
add_action( 'admin_enqueue_scripts', 'td_admin_scripts' ); | |
/** | |
* Add custom css for admin theme | |
*/ | |
add_action( 'admin_enqueue_scripts', 'td_admin_styles' ); | |
/** | |
* Add images to RSS feed | |
*/ | |
add_action('rss2_item', 'add_my_rss_node'); | |
/** | |
* Remove tag meta box from posts | |
*/ | |
add_action( 'init', 'remove_tag_meta_box' ); | |
/** | |
* Remember country & language | |
*/ | |
add_action('init', 'language_saver'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Filters | |
|-------------------------------------------------------------------------- | |
| | |
| | |
| | |
| | |
| | |
*/ | |
/** | |
* fix deprecated | |
*/ | |
add_filter('deprecated_constructor_trigger_error', '__return_false'); | |
/** | |
* Add specials to the permalink sturcture. | |
*/ | |
add_filter('post_link', 'specials_permalink', 10, 3); | |
add_filter('post_type_link', 'specials_permalink', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment