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
| html { | |
| /* Adjust font size */ | |
| font-size: 100%; | |
| -webkit-text-size-adjust: 100%; | |
| /* Font varient */ | |
| font-variant-ligatures: none; | |
| -webkit-font-variant-ligatures: none; | |
| /* Smoothing */ | |
| text-rendering: optimizeLegibility; | |
| -moz-osx-font-smoothing: grayscale; |
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
| //http://wpsettingsapi.jeroensormani.com/ | |
| add_action( 'admin_menu', 'tsumtour_add_admin_menu' ); | |
| add_action( 'admin_init', 'tsumtour_settings_init' ); | |
| function tsumtour_add_admin_menu( ) { | |
| add_submenu_page( 'edit.php?post_type=tour', 'Tour', 'Intro', 'manage_options', 'tour', 'tsumtour_options_page' ); | |
| } | |
| function tsumtour_settings_init( ) { | |
| register_setting( 'pluginPage', 'tsumtour_settings' ); | |
| add_settings_section( | |
| 'tsumtour_pluginPage_section', |
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
| //Auto add and update Title field: | |
| function my_post_title_updater( $post_id ) { | |
| $my_post = array(); | |
| $my_post['ID'] = $post_id; | |
| $my_post['post_name'] = ''; | |
| $posttypes = array( 'accommodation', 'destination' ); | |
| $currentposttype = get_post_type($post_id); | |
| if ( in_array( $currentposttype, $posttypes ) ) { |
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
| add_filter('posts_clauses', 'posts_clauses_with_tax', 10, 2); | |
| function posts_clauses_with_tax( $clauses, $wp_query ) { | |
| global $wpdb; | |
| //array of sortable taxonomies | |
| $taxonomies = array('example-taxonomy', 'other-taxonomy'); | |
| if (isset($wp_query->query['orderby']) && in_array($wp_query->query['orderby'], $taxonomies)) { | |
| $clauses['join'] .= " | |
| LEFT OUTER JOIN {$wpdb->term_relationships} AS rel2 ON {$wpdb->posts}.ID = rel2.object_id | |
| LEFT OUTER JOIN {$wpdb->term_taxonomy} AS tax2 ON rel2.term_taxonomy_id = tax2.term_taxonomy_id | |
| LEFT OUTER JOIN {$wpdb->terms} USING (term_id) |
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: ACF Customizer Patch | |
| Plugin URI: https://gist.github.com/fabrizim/9c0f36365f20705f7f73 | |
| Description: A class to allow acf widget fields to be stored with normal widget settings and allow for use in customizer. | |
| Author: Mark Fabrizio | |
| Version: 1.0 | |
| Author URI: http://owlwatch.com/ | |
| */ | |
| class acf_customizer_patch |
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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{QUERY_STRING} !ajax | |
| RewriteRule ^(.*)$ /#/$1 [R=301,L,NE] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d |