Server IP : 213.176.29.180  /  Your IP : 3.147.193.205
Web Server : Apache
System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
User : webtaragh ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0777) :  /home/webtaragh/public_html/whmcs/../wp-content/plugins/wp-social/app/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/webtaragh/public_html/whmcs/../wp-content/plugins/wp-social/app/route.php
<?php

namespace WP_Social\App;

use WP_Social\Base\Api;

class Route extends Api {

	public function config() {

		$this->prefix = 'settings';
		$this->param = "";
	}


	public function post_clear_counter_cache() {

		$data = $this->request->get_params();

		if(!empty($data['provider'])) {

			$provider = sanitize_key($data['provider']);
			$username = isset($data['username']) ? sanitize_key($data['username']) : '';

			if(delete_transient('_xs_social_' . $provider . '_count_' . $username)) {

				return [
					'success' => true,
					'msg'     => esc_html__('Cache cleared successfully!', 'wp-social')
				];
			}

			return [
				'success' => true,
				'msg'     => esc_html__('No cache found.', 'wp-social')
			];
		}

		return [
			'success' => true,
			'msg'     => esc_html__('Invalid data.', 'wp-social')
		];
	}
}