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
| /** | |
| * Sets filtering of bookings per vendor. | |
| */ | |
| // Bookings Post Listing. Restrict to current user as author | |
| function riv_vendor_bookings_where( $where, $q ) { | |
| global $current_user, $wpdb; | |
| // test the page |
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 | |
| /** | |
| * Product Post Type Labels. Wrap around admin labels for product post type. | |
| * Integrated with check for vendor, so applies to vendor only in WP Admin UI | |
| */ | |
| final class Theme_Product_Labels { | |
| /** |
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
| /* Command Line: Dump Table Contents. One insert per line */ | |
| mysqldump --complete-insert --lock-all-tables --no-create-db | |
| --no-create-info --skip-extended-insert --password=XXX -u XXX | |
| --dump-date dump_table_name > dump_table_data.sql | |
| /* Command Line: Dump Table Contents. One insert per line. Root SSH no pwd */ | |
| mysqldump --complete-insert --lock-all-tables --no-create-db | |
| --no-create-info --skip-extended-insert --dump-date dump_table_name > dump_table_data.sql | |
| /* Command Line: Dump Table Contents & Structure. One insert per line. Root SSH no pwd */ |
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
| <script> | |
| function charType(chr, pos) { | |
| pos = (pos === undefined) ? 0 : parseInt(pos); | |
| var ret = "O"; | |
| var code = chr.charCodeAt(pos); | |
| if (code >= "A".charCodeAt(0) && code <= "Z".charCodeAt(0)) { | |
| return "U"; |
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( 'terms_clauses', 'filter_terms_clauses', 10, 3 ); | |
| /** | |
| * Filter WP_Term_Query meta query | |
| * | |
| * @param object $query WP_Term_Query | |
| * @return object | |
| */ | |
| function filter_terms_clauses( $pieces, $taxonomies, $args ) { | |
| global $pagenow, $wpdb; |
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( 'get_terms', 'filter_get_terms', 10, 2 ); | |
| /** | |
| * Enable drilldown in term meta column | |
| * - Requires the meta column value to be wrapped in a link with '&meta_field_name=meta_field_value' | |
| * - urlencode meta field value & sanitize input | |
| */ | |
| function filter_get_terms( $terms, $taxonomy ) { | |
| global $wpdb, $pagenow; | |
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( 'get_terms_args', 'filter_term_args', 10, 2 ); | |
| /** | |
| * Filter get_terms args | |
| * - within term edit page | |
| */ | |
| function filter_term_args( $args, $taxonomies ) { | |
| global $wpdb, $pagenow; |
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_action( 'pre_get_terms', 'filter_pre_get_terms', 10, 2 ); | |
| /** | |
| * Filter WP_Term_Query meta query | |
| * - a better drill down for filtering term meta data | |
| * - keeps pagination in line with term count | |
| * - used in term edit page | |
| * | |
| * @param object $query WP_Term_Query | |
| */ |
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 ( have_posts() ) : ?> | |
| <?php while( have_posts() ) : the_post() ?> | |
| <!-- Post Content Here --> | |
| <?php endwhile ?> | |
| <?php else : ?> | |
| <!-- Content If No Posts --> | |
| <?php endif ?> |
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 | |
| // Set future post status | |
| $args = array( | |
| 'post_type' => 'post', | |
| 'post_status' => 'future' | |
| ); | |
| // Process Query | |
| $scheduled = new WP_Query( $args ); |
OlderNewer