I hereby claim:
- I am aaronrutley on github.
- I am aaronrutley (https://keybase.io/aaronrutley) on keybase.
- I have a public key ASBzb1uA4KUevirp6YyfU502POCLNUueKtrGegputpECMwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| if (have_rows('my_repeater_field')) { | |
| $mycounter = 0; | |
| while (have_rows('my_repeater_field')) { | |
| the_row(); | |
| $mycounter++; | |
| echo $mycounter; | |
| } | |
| } | |
| ?> |
| <?php // Save ACF Testimonials to post content | |
| function ar_save_testimonials_to_content( $post_id ) { | |
| // Only run this code if we're on a particilar post / page | |
| if( $post_id === 1234 ) { | |
| // Start an output buffer | |
| ob_start(); | |
| // Loop over our testimonials |
| <?php | |
| function ar_register_project_meta() { | |
| register_api_field( | |
| 'project', | |
| 'meta', | |
| array( | |
| 'get_callback' => 'ar_register_project_meta_get', | |
| ) | |
| ); | |
| } |
| <?php | |
| function ar_custom_project_endpoint($data) { | |
| $args = array( | |
| 'posts_per_page' => -1, | |
| 'offset' => 0, | |
| 'category' => '', | |
| 'category_name' => '', | |
| 'orderby' => 'title', | |
| 'order' => 'ASC', |
| <?php // Function Partial : Custom Post Types | |
| add_action('init', 'turbo_custom_post_types'); | |
| // Register Custom Post Type | |
| function turbo_custom_post_types() { | |
| $types = array( | |
| array( | |
| 'the_type' => 'work', | |
| 'single' => 'Work Item', | |
| 'plural' => 'Work Items', |
| <?php | |
| function ar_responsive_image($image_id,$image_size,$max_width){ | |
| // check the image ID is not blank | |
| if($image_id != '') { | |
| // set the default src image size | |
| $image_src = wp_get_attachment_image_url( $image_id, $image_size ); | |
| // set the src set with various image sizes | |
| $image_srcset = wp_get_attachment_image_srcset( $image_id, $image_size ); | |
| // generate the markup for the responsive image |
| ## right time prompt | |
| RPROMPT='[%t]' |
| <?php | |
| function ar_ig_get_photos() { | |
| // set end point (json) | |
| $endpoint = "https://api.instagram.com/v1/users/etc-json"; | |
| // Initiate curl | |
| $ch = curl_init(); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
| <title>My App</title> | |
| <style type="text/css"> | |
| body { |