$status, 'message' => $message, 'redirect' => $redirect, 'data' => $data ); $response = json_encode( $response ); exit( $response ); } } if ( ! function_exists( 'mkdf_membership_ajax_response_message_holder' ) ) { /** * Template for ajax response */ function mkdf_membership_ajax_response_message_holder() { $html = '
'; echo staffscout_mikado_display_content_output($html); } add_action( 'mkdf_membership_action_login_ajax_response', 'mkdf_membership_ajax_response_message_holder' ); } if ( ! function_exists( 'mkdf_membership_execute_shortcode' ) ) { /** * @param $shortcode_tag - shortcode base * @param $atts - shortcode attributes * @param null $content - shortcode content * * @return mixed|string */ function mkdf_membership_execute_shortcode( $shortcode_tag, $atts, $content = null ) { global $shortcode_tags; if ( ! isset( $shortcode_tags[ $shortcode_tag ] ) ) { return; } if ( is_array( $shortcode_tags[ $shortcode_tag ] ) ) { $shortcode_array = $shortcode_tags[ $shortcode_tag ]; return call_user_func( array( $shortcode_array[0], $shortcode_array[1] ), $atts, $content, $shortcode_tag ); } return call_user_func( $shortcode_tags[ $shortcode_tag ], $atts, $content, $shortcode_tag ); } } if ( ! function_exists( 'mkdf_membership_kses_img' ) ) { /** * Function that does escaping of img html. * It uses wp_kses function with predefined attributes array. * Should be used for escaping img tags in html. * Defines staffscout_mikado_kses_img_atts filter that can be used for changing allowed html attributes * * @see wp_kses() * * @param $content string string to escape * * @return string escaped output */ function mkdf_membership_kses_img( $content ) { $img_atts = apply_filters( 'mkdf_membership_filter_kses_img_atts', array( 'src' => true, 'alt' => true, 'height' => true, 'width' => true, 'class' => true, 'id' => true, 'title' => true ) ); return wp_kses( $content, array( 'img' => $img_atts ) ); } }