This file contains 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 | |
$strings = [ | |
'One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve', | |
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua', | |
'Bacon ipsum dolor amet burgdoggen biltong pastrami, kielbasa sirloin strip steak cupim andouille tenderloin.', | |
'Hodor. Hodor hodor, hodor. Hodor hodor hodor hodor hodor. Hodor. Hodor! Hodor hodor, hodor; hodor hodor hodor.', | |
'Lorem Ipsum is the single greatest threat. We are not - we are not keeping up with other websites.', | |
'Cupcake ipsum dolor. Sit amet marshmallow topping cheesecake muffin.', | |
'This test is short.', |
This file contains 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 | |
/** | |
* Maintenance Mode | |
* | |
* @package MaintenanceMode | |
* @author Micah Wood | |
* @copyright Copyright 2022 by Micah Wood - All rights reserved. | |
* @license GPL2.0-or-later | |
* | |
* @wordpress-plugin |
This file contains 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
name: Deploy Website | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
name: Deploy |
This file contains 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 | |
/** | |
* Custom Rest URL | |
* | |
* @package CustomRestUrl | |
* @author Micah Wood | |
* @copyright Copyright 2021 by Micah Wood - All rights reserved. | |
* @license GPL2.0-or-later | |
* |
This file contains 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 | |
$cache_key = 'my_api_call_response'; | |
$response = get_transient( $cache_key ); | |
if ( ! $response ) { | |
$response = wp_remote_get('https://example.com/api/v1/endpoint'); | |
$status_code = (int) wp_remote_retrieve_response_code( $response ); | |
$body = wp_remote_retrieve_body( $response ); | |
$data = json_decode( $body, true ); | |
if ( 200 === $status_code && $data ) { |
This file contains 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 | |
/** | |
* Post Content Shortcode | |
* | |
* @package PostContentShortcode | |
* @author Micah Wood | |
* @copyright Copyright 2020 by Micah Wood - All rights reserved. | |
* @license GPL2.0-or-later | |
* | |
* @wordpress-plugin |
This file contains 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_filter( | |
'site_transient_update_plugins', | |
function ( $transient ) { | |
$plugins = array( | |
'wordpress-seo/wp-seo.php', | |
); | |
foreach ( $plugins as $plugin ) { |
This file contains 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 | |
$place = Stellar_Places::get_place_object( get_post() ); | |
$nearby = Stellar_Places::get_places( | |
array( | |
'post__not_in' => array( get_the_ID() ), | |
'geo_query' => array( | |
'lat' => $place->latitude, | |
'lng' => $place->longitude, | |
'distance' => 1, | |
), |