This file contains hidden or 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 | |
| /* | |
| Plugin Name: WP_Rewrite endpoints demo | |
| Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
| Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
| Author: Jon Cave | |
| Author URI: http://joncave.co.uk/ | |
| */ | |
| function makeplugins_endpoints_add_endpoint() { |
This file contains hidden or 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
| # BEGIN REQUIRED FOR WEBFONTS | |
| AddType font/ttf .ttf | |
| AddType font/eot .eot | |
| AddType font/otf .otf | |
| AddType font/woff .woff | |
| <FilesMatch "\.(ttf|otf|eot|woff)$"> | |
| <IfModule mod_headers.c> | |
| Header set Access-Control-Allow-Origin "*" |
This file contains hidden or 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
| /** | |
| * get hierarchical post ancestor (level 0) | |
| * | |
| * @param int|object $post | |
| * @return object post ancestor | |
| * | |
| * @usage get_post_ancestor(131) | get_post_ancestor($post) | |
| * | |
| **/ | |
| function get_post_ancestor( $post = false ) { |
This file contains hidden or 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
| /** | |
| * adds meta values on search query | |
| * | |
| * @param object $query | |
| * | |
| **/ | |
| function custom_search_query( $query ) { | |
| if ( !is_admin() && $query->is_search ) { | |
| $query->set('meta_query', array( | |
| array( |
NewerOlder