Admin wp_capabilities wp_user_level 10
a:1:{s:13:"administrator";b:1;}
Contributor wp_capabilities wp_user_level 1
| <?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' ); |
| (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 | |
| /** | |
| * 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] | |
| * |
| <?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 | |
| return array( | |
| "post_type" => "park", | |
| "post_status" => "publish", | |
| "posts_per_page" => 100 | |
| ); |
| <?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 | |
| /* 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 |
| 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'); |
| // Remove Access to the course linked to the subscription key | |
| function remove_course_access( $user_id, $subscription_key ) { | |
| // Get the course ID related to the subscription | |
| $subscription = WC_Subscriptions_Manager::get_subscription( $subscription_key ); | |
| $courses_id = get_post_meta($subscription['product_id'], '_related_course', true); | |
| // Update access to the courses | |
| if ($courses_id && is_array($courses_id)) { | |
| foreach ($courses_id as $course_id) { |