public static function footer_js() { /** * Footer JS Compatibility */ if (rs_wpss_is_admin_sproc()) { return; } $js = ''; /* Vantage Theme by Appthemes ( https://www.appthemes.com/themes/vantage/ ) */ global $wpss_theme_vantage; $v_js = ', #add-review-form'; if (!empty($wpss_theme_vantage)) { $js .= $v_js; } elseif (defined('APP_FRAMEWORK_DIR_NAME') && defined('VA_VERSION')) { $js .= $v_js; } else { $wpss_theme = wp_get_theme(); $theme_name = $wpss_theme->get('Name'); $theme_author = $wpss_theme->get('Author'); if ('Vantage' === $theme_name && 'AppThemes' === $theme_author) { $js .= $v_js; } } /* Add next here... */ return $js; }
function enqueue_scripts() { if ((!is_admin() && is_user_logged_in() || !is_user_logged_in()) && !rs_wpss_is_admin_sproc()) { $js_handle = 'wpss-jscripts-ftr'; $js_file = 'jscripts-ftr-min.js'; $js_ver = NULL; /* '1.0', WPSS_VERSION */ if (TRUE === WPSS_COMPAT_MODE || defined('WPSS_SOFT_COMPAT_MODE') || current_user_can('moderate_comments')) { $js_file = 'jscripts-ftr2-min.js'; } wp_register_script($js_handle, WPSS_PLUGIN_JS_URL . '/' . $js_file, array('jquery'), $js_ver, TRUE); wp_enqueue_script($js_handle); } }
public static function counter_sm_short($atts = array()) { if (rs_wpss_is_admin_sproc()) { return NULL; } global $wpss_wid_inst; if (!isset($wpss_wid_inst)) { $wpss_wid_inst = 0; } ++$wpss_wid_inst; $counter_sm_option = $atts['style']; $counter_sm_option_max = 5; $counter_sm_option_min = 1; if (empty($counter_sm_option) || $counter_sm_option > $counter_sm_option_max || $counter_sm_option < $counter_sm_option_min) { $counter_sm_option = 1; } /*** * Display Small Counter * Implementation: [spamshieldcountersm style=1] or [spamshieldcountersm] where "style" is 1-5 ***/ $spamshield_count = !empty($atts['spamshield_count']) ? $atts['spamshield_count'] : rs_wpss_number_format(rs_wpss_count()); $counter_sm_div_height = array('0', '50', '50', '50', '50', '50'); $counter_sm_count_padding_top = array('0', '11', '11', '11', '11', '11'); $wpss_shortcode_content = ''; $wpss_shortcode_content .= WPSS_EOL . WPSS_EOL; $wpss_shortcode_content .= '<style type="text/css">' . WPSS_EOL; $wpss_shortcode_content .= '#rs_wpss_counter_sm_wrap_' . $wpss_wid_inst . ' {color:#ffffff;text-decoration:none;width:120px;}' . WPSS_EOL; $wpss_shortcode_content .= '#rs_wpss_counter_sm_' . $wpss_wid_inst . ' {background:url(' . WPSS_PLUGIN_COUNTER_URL . '/o/spamshield-counter-sm-bg-' . $counter_sm_option . '.png) no-repeat top left;height:' . $counter_sm_div_height[$counter_sm_option] . 'px;width:120px;overflow:hidden;border-style:none;color:#ffffff;font-family:Arial,Helvetica,sans-serif;font-weight:bold;line-height:100%;text-align:center;padding-top:' . $counter_sm_count_padding_top[$counter_sm_option] . 'px;}' . WPSS_EOL; $wpss_shortcode_content .= '</style>' . WPSS_EOL . WPSS_EOL; $wpss_shortcode_content .= '<div id="rs_wpss_counter_sm_wrap_' . $wpss_wid_inst . '" >' . WPSS_EOL . "\t"; $wpss_shortcode_content .= '<div id="rs_wpss_counter_sm_' . $wpss_wid_inst . '" >' . WPSS_EOL; $sip1c = substr(WPSS_SERVER_ADDR, 0, 1); if ($counter_sm_option >= 1 && $counter_sm_option <= 5) { if ($sip1c > '5') { $spamshield_counter_title_text = WPSS_Promo_Links::promo_text(9); } else { $spamshield_counter_title_text = WPSS_Promo_Links::promo_text(10); } $wpss_shortcode_content .= "\t" . '<strong style="color:#ffffff;font-family:Arial,Helvetica,sans-serif;font-weight:bold;line-height:100%;text-align:center;text-decoration:none;border-style:none;"><a href="' . WPSS_HOME_URL . '" style="color:#ffffff;font-family:Arial,Helvetica,sans-serif;font-weight:bold;text-decoration:none;border-style:none;" target="_blank" rel="external" title="' . $spamshield_counter_title_text . '" >' . WPSS_EOL; $wpss_shortcode_content .= "\t" . '<span style="color:#ffffff;font-size:18px !important;line-height:100% !important;font-family:Arial,Helvetica,sans-serif;font-weight:bold;text-decoration:none;border-style:none;">' . $spamshield_count . '</span><br />' . WPSS_EOL; $wpss_shortcode_content .= "\t" . '<span style="color:#ffffff;font-size:10px !important;line-height:120% !important;letter-spacing:1px;font-family:Arial,Helvetica,sans-serif;font-weight:bold;text-decoration:none;border-style:none;">' . WPSS_Promo_Links::promo_text(0) . '</span>' . WPSS_EOL; $wpss_shortcode_content .= "\t" . '</a></strong>' . WPSS_EOL; } $wpss_shortcode_content .= "\t" . '</div>' . WPSS_EOL; $wpss_shortcode_content .= '</div>' . WPSS_EOL; return $wpss_shortcode_content; }
public static function check_admin_sec() { /*** * Admin Security Checks * Check for specific plugin security issues and apply fix or workaround * Added 1.9.5.8 ***/ if (rs_wpss_is_admin_sproc(TRUE)) { return; } /* New User Approve Plugin ( https://wordpress.org/plugins/new-user-approve/ ) */ self::admin_sec_fix_nua(); /* Add next here... */ }