- Given an API route for retrieving a specific record, do the following:
- Get the
idparam - Return a 404 if the record isn't found
- Return a response with the record if it is found
- Get the
Route format:
php| /* General iframe Background */ | |
| iframe { | |
| background: #fff; | |
| } | |
| /* Update Credit Card Field */ | |
| #stripe-card-element { | |
| background: #ffffff !important; | |
| padding: 10px 5px !important; | |
| margin: 5px 0px !important; |
| Timesheet: <b>January 4, 2019</b> | |
| <br/><br/> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Project</th> | |
| <th>Task</th> | |
| <th>Hours</th> | |
| </tr> | |
| </thead> |
| <?php | |
| // Exit if accessed directly | |
| if ( !defined( 'ABSPATH' ) ) { | |
| exit; | |
| } | |
| /** | |
| * Archive Template | |
| * |
| /** | |
| * This file is enqueued by means of wp_enqueue_script() - variables are passed | |
| * in from PHP by means of wp_localize_script() | |
| * | |
| */ | |
| /* TM: We use an anonymous function to invoke the JavaScript. Also refactored for proper | |
| * WordPress coding standards. | |
| */ | |
| (function( $ ) { |
| # Ignore everything # | |
| ** | |
| !wp-content/ | |
| wp-content/** | |
| !wp-content/themes/ | |
| !wp-content/plugins/ | |
| wp-content/themes/** | |
| wp-content/plugins/** | |
| # Add two rules for each Theme or Plugin you want to include: |
| <?php | |
| /* Template Name: Featured Blog with excerpts */ | |
| /** | |
| * Excerpt Length | |
| * | |
| */ | |
| function be_custom_excerpt_length( $length ) { | |
| return 50; |
| <?php | |
| /** | |
| * Javascript for Load More | |
| * | |
| */ | |
| function be_load_more_js() { | |
| global $wp_query; | |
| $args = array( |
| <?php | |
| /** | |
| * Template Name: Residential Portfolio | |
| * | |
| */ | |
| remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
| add_action( 'genesis_loop', 'custom_do_press_loop' ); // Add custom loop | |
| function custom_do_press_loop() { |
| <?php | |
| //---------------------------------------------------------- | |
| // Display Posts Shortcode plugin: add H2 to title | |
| //---------------------------------------------------------- | |
| add_filter( 'display_posts_shortcode_output', 'format_dps_title', 10, 9 ); | |
| function format_dps_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) { | |
| // Make Title and H2 | |
| $title = ' <h3>'. $title .'</h3>'; |