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 | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| class RegisterLocationRewriteRule | |
| { | |
| /** | |
| * Start up |
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 | |
| function combine_and_sort_cpt_by_date( $query ) { | |
| $post_types = array( | |
| 'post_type_one', | |
| 'post_type_two' | |
| ) | |
| if ( $query->is_post_type_archive( $post_types ) ) { | |
| $query->set( 'post_type', $post_types ); | |
| $query->set( 'orderby', 'meta_value' ); |
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 | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| class RegisterWidgets | |
| { | |
| /** |
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 | |
| /** | |
| * Add Metaboxes to Wordpress Post Types | |
| */ | |
| class Add_Metabox { | |
| function __construct() { | |
| add_action( 'add_meta_boxes', array( $this , 'register_metabox') ); |