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
| (function($) { | |
| /* | |
| * new_map | |
| * | |
| * This function will render a Google Map onto the selected jQuery element | |
| * | |
| * @type function | |
| * @date 8/11/2013 | |
| * @since 4.3.0 |
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 | |
| //My ACF Fields for reference | |
| //testimonials - field group | |
| //testimonial - sub-field | |
| //testimonial_header - sub-field | |
| //First Repeater Row in Array | |
| $rows = get_field( 'testimonials', 348 );// grab all rows from page 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 if( have_rows('billboard') ): ?> | |
| <div class="billboard"> | |
| <?php while( have_rows('billboard') ): the_row(); | |
| $imageArray = get_sub_field('image'); | |
| $imageURL = $imageArray['url']; | |
| ?> | |
| <div class="slide-item" style="background-image: url('<?php echo $imageURL;?>');" > | |
| <h1><?php the_sub_field('title'); ?></h1> | |
| </div> |
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
| #!/bin/sh | |
| # | |
| # This script uses rsstail to retrieve latests entries from Reddit Popular rss feed | |
| # and process them through awk. Each update shows a timestamp separator. | |
| # | |
| # It will work with most RSS feeds out there. | |
| # | |
| if [ $# -eq 1 ]; then | |
| subreddit="r/$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 | |
| /* Thanks to http://steindom.com/articles/shortest-php-code-convert-csv-associative-array */ | |
| ini_set('auto_detect_line_endings', TRUE); | |
| $rows = array_map('str_getcsv', file('myfile.csv')); | |
| $header = array_shift($rows); | |
| $csv = array(); | |
| foreach ($rows as $row) { |
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
| # Redirect requests to /wp-content/uploads/* to production | |
| set $production themotoringnetwork.com.au; | |
| location @prod_uploads { | |
| rewrite "^(.*)/wp-content/uploads/(.*)$" "https://$production/wp-content/uploads/$2" break; | |
| } | |
| # Rule for handling local requests for images | |
| location ~ "^/wp-content/uploads/(.*)$" { | |
| try_files $uri @prod_uploads; |
OlderNewer