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 mbn_get_stores_by_location( $zip, $radius ) { | |
| global $wpdb; | |
| $radius = intval( $radius ); | |
| // we first need to get the source coordinates | |
| $sql = "SELECT `latitude`, `longitude` FROM `wp_zip_codes` WHERE `zipcode` = '%s'"; | |
| $coords = $wpdb->get_row( $wpdb->prepare( $sql, $zip ) ); | |
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 | |
| $value = array( | |
| array( | |
| 'text' => 'text', | |
| 'image' => 1 | |
| ), | |
| array( | |
| 'text' => 'text2', | |
| 'image' => 2 | |
| ) |
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
| "post_title","post_type","lat","lng" | |
| "Map","post",35.710115,139.810203 |
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 | |
| /** | |
| * RSS2 Feed Template for displaying RSS2 Posts feed. | |
| * Adds an offset of "1" to display all but most recent | |
| * Full details at: https://wordimpress.com/anatomy-advanced-wordpress-blog-notification-email | |
| * @package WordPress | |
| */ | |
| header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); | |
| $more = 1; |
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 | |
| /** | |
| * Integrate Gravity Forms with Engaging Networks | |
| * | |
| */ | |
| function gp_en_connector( $entry, $form ) { | |
| if ( isset($entry['14']) ) // Using a hidden form field now, but would like to use a custom for setting instead. | |
| { | |
| $fields['format'] = 'json'; |
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
| /* | |
| ** | |
| * Fix for overlapping WP-admin bar and Bootstrap fixed navbar | |
| * | |
| ----------------------------------------------------------*/ | |
| body.admin-bar .navbar-fixed-top { | |
| position:fixed; | |
| top: 46px; | |
| z-index: 1000; | |
| } |
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 | |
| /** | |
| * => Move Yoast SEO box to bottom of page | |
| * | |
| *-------------------------------------------------- */ | |
| function yoasttobottom() { | |
| return 'low'; | |
| } | |
| add_filter( 'wpseo_metabox_prio', __NAMESPACE__ . '\\yoasttobottom'); |
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 | |
| /*** | |
| * => Hide ACF menu except for specified users | |
| * | |
| --------------------------------------------------- */ | |
| function gp_acf_show_admin( $show ) { | |
| $current_user = wp_get_current_user(); |
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
| /** | |
| Bootstrap accordion scroll to top of active panel heading | |
| http://stackoverflow.com/a/29195062/1241535 | |
| ----------------------------------------------*/ | |
| $('#accordion').on('shown.bs.collapse', function (e) { | |
| var offset = $(this).find('.collapse.in').prev('.panel-heading'); | |
| if(offset) { | |
| $('html,body').animate({ | |
| scrollTop: $(offset).offset().top -100 | |
| }, 500); |
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 | |
| // This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker | |
| // somewhere in your theme. | |
| ?> | |
| <header class="banner navbar navbar-default navbar-static-top" role="banner"> | |
| <div class="container"> | |
| <div class="navbar-header"> | |
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> | |
| <span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span> |