Admin wp_capabilities wp_user_level 10
a:1:{s:13:"administrator";b:1;}
Contributor wp_capabilities wp_user_level 1
| function google_fonts() { | |
| $query_args = array( | |
| 'family' => 'Open+Sans:400,700|Oswald:700' | |
| 'subset' => 'latin,latin-ext', | |
| ); | |
| wp_register_style( 'google_fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null ); | |
| } | |
| add_action('wp_enqueue_scripts', 'google_fonts'); |
| <?php | |
| /* Pull apart OEmbed video link to get thumbnails out*/ | |
| function get_video_thumbnail_uri( $video_uri ) { | |
| $thumbnail_uri = ''; | |
| // determine the type of video and the video id | |
| $video = parse_video_uri( $video_uri ); | |
| // get youtube thumbnail |
| <?php | |
| add_filter( 'bbp_get_reply_author_link', 'my_append_badges_via_filter', 10, 2 ); | |
| function my_append_badges_via_filter($author_link = '', $args) { | |
| # Needed to get the user ID of the person intended to be displayed. | |
| $user_id = bbp_get_reply_author_id( $args['post_id'] ); | |
| #Construct your output here. | |
| $badge_output = ''; |
| <?php | |
| return array( | |
| "post_type" => "park", | |
| "post_status" => "publish", | |
| "posts_per_page" => 100 | |
| ); |
| <?php | |
| /** | |
| * -------------------------------------------------- | |
| * Gravity Form dynamically populate drop-down | |
| * select for Questions form ID 15 | |
| * 'gform_pre_render_14' - _14 represents form ID to filter | |
| * -------------------------------------------------- | |
| */ | |
| add_filter( 'gform_pre_render_14', 'pre_populate_gravity_select_for_MY_TAX' ); | |
| add_filter( 'gform_pre_validation_14', 'pre_populate_gravity_select_for_MY_TAX' ); |
| <?php | |
| /** | |
| * Gravity Wiz // Gravity Forms // Advanced Conditional Shortcodes | |
| * | |
| * [gravityforms action="conditional" relation="any" | |
| value="{:2}" operator="is" compare="First Choice" | |
| value2="{:1}" operator2="isnot" compare2="Second Choice"] | |
| Content you would like to conditionally display. | |
| [/gravityforms] | |
| * |
| (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 |
| <?php | |
| /*-----------------------------------------------------------------------------------*/ | |
| /* Putting Locations in a Dropdown, Radio Button, or Multi-Select */ | |
| /* Helpful article - https://www.gravityhelp.com/documentation/article/dynamically-populating-drop-down-fields/ */ | |
| /*-----------------------------------------------------------------------------------*/ | |
| $location_form_id = 9; | |
| add_filter( 'gform_pre_render_'.$location_form_id, 'populate_posts' ); | |
| add_filter( 'gform_pre_validation_'.$location_form_id, 'populate_posts' ); | |
| add_filter( 'gform_pre_submission_'.$location_form_id, 'populate_posts' ); | |
| add_filter( 'gform_pre_submission_filter_'.$location_form_id, 'populate_posts' ); |
| <script> | |
| (function($) { | |
| $(document).on('facetwp-refresh', function() { | |
| if (FWP.loaded && '' == FWP_HTTP.uri) { // if not the initial pageload, and we're on the homepage | |
| window.location.href = '/listings/?' + FWP.build_query_string(); // redirect | |
| } | |
| }); | |
| })(jQuery); |