403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.217.39
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/home2/etddev/wordpress/wp-content/plugins/select-membership/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/home2/etddev/wordpress/wp-content/plugins/select-membership/helper.php
<?php
/**
 * Plugin functions
 */

if ( ! function_exists( 'qodef_membership_version_class' ) ) {
	/**
	 * Adds plugin version class to body
	 *
	 * @param $classes
	 *
	 * @return array
	 */
	function qodef_membership_version_class( $classes ) {
		$classes[] = 'qodef-social-login-' . QODE_MEMBERSHIP_VERSION;

		return $classes;
	}

	add_filter( 'body_class', 'qodef_membership_version_class' );
}

if ( ! function_exists( 'qodef_membership_theme_installed' ) ) {
	/**
	 * Checks whether theme is installed or not
	 * @return bool
	 */
	function qodef_membership_theme_installed() {
		return defined( 'QODE_ROOT' );
	}
}

if ( ! function_exists( 'qodef_membership_get_shortcode_template_part' ) ) {
	/**
	 * Loads Shortcode template part.
	 *
	 * @param $shortcode
	 * @param $template
	 * @param string $slug
	 * @param array $params
	 *
	 * @see cityrama_qodef_get_template_part()
	 * @return string
	 */
	function qodef_membership_get_shortcode_template_part( $shortcode, $template, $slug = '', $params = array() ) {

		//HTML Content from template
		$html          = '';
		$template_path = QODE_MEMBERSHIP_ABS_PATH . '/shortcodes/' . $shortcode . '/templates';

		$temp = $template_path . '/' . $template;
		if ( is_array( $params ) && count( $params ) ) {
			extract( $params );
		}

		$template = '';

		if ( $temp !== '' ) {
			if ( $slug !== '' ) {
				$template = "{$temp}-{$slug}.php";
			}
			$template = $temp . '.php';
		}
		if ( $template ) {
			ob_start();
			include( $template );
			$html = ob_get_clean();
		}

		return $html;
	}
}

if ( ! function_exists( 'qodef_membership_get_widget_template_part' ) ) {
	/**
	 * Loads Widget template part.
	 *
	 * @param $widget
	 * @param $template
	 * @param string $slug
	 * @param array $params
	 *
	 * @see cityrama_qodef_get_template_part()
	 * @return string
	 */
	function qodef_membership_get_widget_template_part( $widget, $template, $slug = '', $params = array() ) {

		//HTML Content from template
		$html          = '';
		$template_path = QODE_MEMBERSHIP_ABS_PATH . '/widgets/' . $widget . '/templates';

		$temp = $template_path . '/' . $template;
		if ( is_array( $params ) && count( $params ) ) {
			extract( $params );
		}

		$template = '';

		if ( $temp !== '' ) {
			if ( $slug !== '' ) {
				$template = "{$temp}-{$slug}.php";
			}
			$template = $temp . '.php';
		}

		if ( $template ) {
			ob_start();
			include( $template );
			$html = ob_get_clean();
		}

		return $html;
	}
}

if ( ! function_exists( 'qodef_membership_ajax_response' ) ) {
	/**
	 * Ajax response for login and register forms
	 *
	 * @param $status
	 * @param string $message
	 * @param string $redirect
	 * @param null $data
	 */
	function qodef_membership_ajax_response( $status, $message = '', $redirect = '', $data = null ) {
		$response = array(
			'status'   => $status,
			'message'  => $message,
			'redirect' => $redirect,
			'data'     => $data
		);

		$response = json_encode( $response );

		exit( $response );
	}
}

if ( ! function_exists( 'qodef_membership_ajax_response_message_holder' ) ) {
	/**
	 * Template for ajax response
	 */
	function qodef_membership_ajax_response_message_holder() {

		$html = '<div class="qodef-membership-response-holder clearfix"></div>';
		$html .= '<script type="text/template" class="qodef-membership-response-template">
					<div class="qodef-membership-response <%= messageClass %> ">
						<div class="qodef-membership-response-message">
							<p><%= message %></p>
						</div>
					</div>
				</script>';

		echo cityrama_qodef_get_module_part( $html );
	}

	add_action( 'qodef_membership_action_login_ajax_response', 'qodef_membership_ajax_response_message_holder' );

}

if ( ! function_exists( 'qodef_membership_execute_shortcode' ) ) {
	/**
	 * @param $shortcode_tag - shortcode base
	 * @param $atts - shortcode attributes
	 * @param null $content - shortcode content
	 *
	 * @return mixed|string
	 */
	function qodef_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( 'qodef_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 cityrama_qodef_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 qodef_membership_kses_img( $content ) {
		$img_atts = apply_filters( 'qodef_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
		) );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit