| Server IP : 89.108.64.180 / Your IP : 216.73.217.92 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/hotelvv.ru/wp-content/plugins/select-membership/ |
Upload File : |
<?php
/**
* Plugin functions
*/
if ( ! function_exists( 'stockholm_qode_membership_version_class' ) ) {
/**
* Adds plugin version class to body
*
* @param $classes
*
* @return array
*/
function stockholm_qode_membership_version_class( $classes ) {
$classes[] = 'qode-social-login-' . QODE_MEMBERSHIP_VERSION;
return $classes;
}
add_filter( 'body_class', 'stockholm_qode_membership_version_class' );
}
if ( ! function_exists( 'stockholm_qode_membership_theme_installed' ) ) {
/**
* Checks whether theme is installed or not
* @return bool
*/
function stockholm_qode_membership_theme_installed() {
return defined( 'QODE_ROOT' );
}
}
if ( ! function_exists( 'stockholm_qode_membership_get_shortcode_template_part' ) ) {
/**
* Loads Shortcode template part.
*
* @param $shortcode
* @param $template
* @param string $slug
* @param array $params
*
* @see stockholm_qode_get_template_part()
* @return string
*/
function stockholm_qode_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( 'stockholm_qode_membership_get_widget_template_part' ) ) {
/**
* Loads Widget template part.
*
* @param $widget
* @param $template
* @param string $slug
* @param array $params
*
* @see stockholm_qode_get_template_part()
* @return string
*/
function stockholm_qode_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( 'stockholm_qode_membership_ajax_response' ) ) {
/**
* Ajax response for login and register forms
*
* @param $status
* @param string $message
* @param string $redirect
* @param null $data
*/
function stockholm_qode_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( 'stockholm_qode_membership_ajax_response_message_holder' ) ) {
/**
* Template for ajax response
*/
function stockholm_qode_membership_ajax_response_message_holder() {
$html = '<div class="qode-membership-response-holder clearfix"></div>';
$html .= '<script type="text/template" class="qode-membership-response-template">
<div class="qode-membership-response <%= messageClass %> ">
<div class="qode-membership-response-message">
<p><%= message %></p>
</div>
</div>
</script>';
echo stockholm_qode_get_module_part($html);
}
add_action( 'stockholm_qode_action_membership_login_ajax_response', 'stockholm_qode_membership_ajax_response_message_holder' );
}
if ( ! function_exists( 'stockholm_qode_membership_execute_shortcode' ) ) {
/**
* @param $shortcode_tag - shortcode base
* @param $atts - shortcode attributes
* @param null $content - shortcode content
*
* @return mixed|string
*/
function stockholm_qode_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( 'stockholm_qode_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.
*
* @see wp_kses()
*
* @param $content string string to escape
*
* @return string escaped output
*/
function stockholm_qode_membership_kses_img( $content ) {
$img_atts = apply_filters( 'stockholm_qode_filter_membership_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
) );
}
}