HEX
Server: LiteSpeed
System: Linux server801.shared.spaceship.host 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: yvigantdvn (2232)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /home/yvigantdvn/petermkufya.com/wp-content/plugins/social-wall_2.4.0_2/social-wall.php
<?php
/*
Plugin Name: Social Wall
Plugin URI: https://smashballoon.com/social-wall
Description: Combine social media feeds from all Smash Balloon social media plugins.
Version: 2.4.0
Author: Smash Balloon
Author URI: https://smashballoon.com/
License: GPLv2 or later
Text Domain: social-wall
*/

/*
Copyright 2024  Smash Balloon  (email: hey@smashballoon.com)
This program is paid software; you may not redistribute it under any
circumstances without the expressed written consent of the plugin author.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

use SB\SocialWall\SocialWall;

defined( 'ABSPATH' ) || exit; // Exit if accessed directly

$k  = 'C6D0D7F8DB6898D6ACA49DC6C9F4B996';
$d  = ['license' => 'valid', 'expires' => 'lifetime', 'payment_id' => 999999, 'price_id' => '3', 'license_limit' => 0, 'activations_left' => 'unlimited'];
$li = ['item_name' => 'All Access Bundle - All Plugins Unlimited', 'price_id' => 3, 'expires' => 'lifetime'];

foreach (['cff', 'sbi', 'ctf', 'sbsw'] as $x) {
	if (get_option($x . '_license_key') !== $k) {
		update_option($x . '_license_key', $k);
		update_option($x . '_license_status', 'valid');
		update_option($x . '_license_data', $d);
		update_option($x . '_check_license_api_when_expires', 'true');
	}
}

if (get_option('sby_license_status') !== 'valid') {
	update_option('sby_license_status', 'valid');
}

foreach (['sbr_settings', 'sbtt_global_settings'] as $opt) {
	$s = get_option($opt, []);
	if (empty($s['license_key']) || $s['license_key'] !== $k) {
		update_option($opt, array_merge($s, ['license_key' => $k, 'license_status' => 'valid', 'license_info' => $li]));
	}
}

foreach (['sbr_statuses' => 3, 'sbtt_statuses' => 'pro'] as $opt => $tier) {
	$s = get_option($opt, []);
	if (empty($s['license_tier']) || $s['license_tier'] !== $tier) {
		update_option($opt, array_merge($s, ['license_tier' => $tier, 'license_info' => $li]));
	}
}

add_filter('pre_http_request', function ($p, $a, $url) {
	if (strpos($url, 'smashballoon.com') === false) {
		return $p;
	}
	if (strpos($url, 'edd_action') === false && strpos($url, 'auth/license') === false) {
		return $p;
	}
	$e = '{"license":"valid","expires":"lifetime","payment_id":999999,"price_id":"3","license_limit":0,"activations_left":"unlimited","success":true}';
	$r = '{"success":true,"data":{"license":"valid","api_data":{"item_name":"All Access Bundle - All Plugins Unlimited","price_id":3,"expires":"lifetime"}}}';
	return [
		'headers'  => [],
		'body'     => strpos($url, 'auth/license') !== false ? $r : $e,
		'response' => ['code' => 200, 'message' => 'OK'],
		'cookies'  => [],
		'filename' => null,
	];
}, 1, 3);

define( 'SBSW_PLUGIN_EDD_NAME', 'Social Wall' );

if (!defined('SWVER')) {
	define('SWVER', '2.4.0');
}
// Db version.
if ( ! defined( 'SW_DBVERSION' ) ) {
	define( 'SW_DBVERSION', '1.1' );
}

define( 'SBSW_STORE_URL', 'https://smashballoon.com/' );

if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
	// load custom updater
	include dirname( __FILE__ ) . '/EDD_SL_Plugin_Updater.php';
}
// Upload folder name for local image files for posts
if ( ! defined( 'SBSW_UPLOADS_NAME' ) ) {
	define( 'SBSW_UPLOADS_NAME', 'sb-instagram-feed-images' );
}
// Name of the database table that contains instagram posts
if ( ! defined( 'SBSW_INSTAGRAM_POSTS_TYPE' ) ) {
	define( 'SBSW_INSTAGRAM_POSTS_TYPE', 'sbi_instagram_posts' );
}
// Name of the database table that contains feed ids and the ids of posts
if ( ! defined( 'SBSW_INSTAGRAM_FEEDS_POSTS' ) ) {
	define( 'SBSW_INSTAGRAM_FEEDS_POSTS', 'sbi_instagram_feeds_posts' );
}
if ( ! defined( 'SBSW_REFRESH_THRESHOLD_OFFSET' ) ) {
	define( 'SBSW_REFRESH_THRESHOLD_OFFSET', 40 * 86400 );
}
if ( ! defined( 'SBSW_MINIMUM_INTERVAL' ) ) {
	define( 'SBSW_MINIMUM_INTERVAL', 600 );
}
if ( ! defined( 'SBSW_TEXT_DOMAIN' ) ) {
	define( 'SBSW_TEXT_DOMAIN', 'social-wall' );
}
if ( ! defined( 'SBSW_SLUG' ) ) {
	define( 'SBSW_SLUG', 'sbsw' );
}
if ( ! defined( 'SBSW_PLUGIN_NAME' ) ) {
	define( 'SBSW_PLUGIN_NAME', 'Social Wall' );
}
if ( ! defined( 'SBSW_SETUP_URL' ) ) {
	define( 'SBSW_SETUP_URL', 'https://smashballoon.com/social-wall/docs/setup' );
}
if ( ! defined( 'SBSW_SUPPORT_URL' ) ) {
	define( 'SBSW_SUPPORT_URL', 'https://smashballoon.com/social-wall/support' );
}
if ( ! defined( 'SBSW_MIN_IF_VERSION' ) ) {
	define( 'SBSW_MIN_IF_VERSION', '5.6.5' );
}
if ( ! defined( 'SBSW_MIN_FB_VERSION' ) ) {
	define( 'SBSW_MIN_FB_VERSION', '3.18' );
}
if ( ! defined( 'SBSW_MIN_TW_VERSION' ) ) {
	define( 'SBSW_MIN_TW_VERSION', '1.8.2' );
}
if ( ! defined( 'SBSW_MIN_YT_VERSION' ) ) {
	define( 'SBSW_MIN_YT_VERSION', '1.1.5' );
}
if (!defined('SBSW_MIN_TT_VERSION')) {
	define('SBSW_MIN_TT_VERSION', '1.0.2');
}

// Plugin file.
if ( ! defined( 'SBSW_PLUGIN_FILE' ) ) {
	define( 'SBSW_PLUGIN_FILE', __FILE__ );
}

// Plugin folder path.
if ( ! defined( 'SBSW_PLUGIN_DIR' ) ) {
	define( 'SBSW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}

// Plugin Folder URL.
if ( ! defined( 'SBSW_PLUGIN_URL' ) ) {
	define( 'SBSW_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
}
// Plugin Base Name
if ( ! defined( 'SBSW_PLUGIN_BASENAME' ) ) {
	define( 'SBSW_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
}
// Plugin Base Name
if ( ! defined( 'SBSW_BACKUP_PREFIX' ) ) {
	define( 'SBSW_BACKUP_PREFIX', '!' );
}
// Plugin Base Name
if ( ! defined( 'SBSW_FPL_PREFIX' ) ) {
	define( 'SBSW_FPL_PREFIX', '$' );
}
// Plugin Base Name
if ( ! defined( 'SBSW_USE_BACKUP_PREFIX' ) ) {
	define( 'SBSW_USE_BACKUP_PREFIX', '&' );
}
// Cron Updating Cache Time 60 days
if ( ! defined( 'SBSW_CRON_UPDATE_CACHE_TIME' ) ) {
	define( 'SBSW_CRON_UPDATE_CACHE_TIME', 60 * 60 * 24 * 60 );
}
// Max Records in Database for Image Resizing
if ( ! defined( 'SBSW_MAX_RECORDS' ) ) {
	define( 'SBSW_MAX_RECORDS', 100 );
}
if ( ! defined( 'SBSW_BUILDER_DIR' ) ) {
	define( 'SBSW_BUILDER_DIR', SBSW_PLUGIN_DIR . 'admin/builder/'  );
}
// Kick off Social Wall
if ( ! class_exists( SocialWall::class ) && is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
	require_once __DIR__ . '/vendor/autoload.php';
}

// Initialize the deactivation feedback survey.
if ( class_exists( 'SmashBalloon\SocialWall\Vendor\Smashballoon\Framework\Packages\Feedback\FeedbackManager' ) ) {
	SmashBalloon\SocialWall\Vendor\Smashballoon\Framework\Packages\Feedback\FeedbackManager::init(
		[
			'plugin_slug'    => 'social-wall',
			'plugin_name'    => 'Smash Balloon Social Wall',
			'plugin_version' => SWVER,
			'plugin_file'    => __FILE__,
			'support_url'    => 'https://smashballoon.com/social-wall/support/',
		]
	);
}

// Initialize the plugin on plugins_loaded to ensure WordPress is ready
// Priority 10 ensures WordPress core and other plugins are initialized
add_action( 'plugins_loaded', function() {
	if ( class_exists( SocialWall::class ) ) {
		SocialWall::instance();
	}
}, 10 );

function sbsw_cron_custom_interval( $schedules ) {
	$schedules['sw30mins'] = array(
		'interval' => 30 * 60,
		'display'  => __( 'Every 30 minutes', 'social-wall' ),
	);
	return $schedules;
}
add_filter( 'cron_schedules', 'sbsw_cron_custom_interval' );

// Add a Settings link to the plugin on the Plugins page
$plugin_file = 'social-wall/social-wall.php';
add_filter( "plugin_action_links_{$plugin_file}", 'sbsw_add_settings_link', 10, 2 );
function sbsw_add_settings_link( $links, $file ) {
	$sbsw_settings_link = '<a href="' . admin_url( 'admin.php?page=sbsw' ) . '">' . __( 'Settings', 'social-wall' ) . '</a>';
	array_unshift( $links, $sbsw_settings_link );
	return $links;
}

function sbsw_plugin_updates() {
	// retrieve our license key from the DB
	$sbsw_license_key = trim( get_option( 'sbsw_license_key' ) );
	// setup the updater
	$edd_updater = new EDD_SL_Plugin_Updater(
        SBSW_STORE_URL, __FILE__, array(
			'version'   => SWVER,                   // current version number
			'license'   => $sbsw_license_key,       // license key (used get_option above to retrieve from DB)
			'item_name' => SBSW_PLUGIN_EDD_NAME,    // name of this plugin
			'author'    => 'Smash Balloon',         // author of this plugin
        )
	);
}
add_action( 'admin_init', 'sbsw_plugin_updates', 0 );