HEX
Server: nginx/1.18.0
System: Linux iZj6c1ieg2jrpk1z5tzi19Z 6.3.9-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 21 22:18:40 EDT 2023 x86_64
User: www (1001)
PHP: 8.2.4
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,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,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.cytocare.cn/wp-content/plugins/wp-social/lib/provider/share/sharer.php
<?php

namespace WP_Social\Lib\Provider\Share;

defined('ABSPATH') || exit;

abstract class Sharer implements Share_Interface {

	protected $global_options;
	protected $key;
	protected $post_id;
	protected $tracking_url;
	protected $option_key;
	protected $url_hash;

	public function __construct($post_id = 0, $key = '') {

		$this->key = $key;

		$this->post_id = $post_id;

		$this->tracking_url = get_permalink($this->post_id);
	}


	protected function get_transient_key() {

		$md5 = md5($this->tracking_url . $this->post_id);

		return 'xs_sharer_' . $this->post_id . '_' . $this->key . '_' . $md5;
	}


	public function need_to_call_legacy_function() {

		return false;
	}


	public function set_config_data($conf_array = []) {

		$this->global_options = $conf_array;

		return $this;
	}


	public function set_uri_hash($hash) {

		$this->url_hash = $hash;

		return $this;
	}


	protected function get_option_key() {

		return 'xs_shared_count__' . $this->key . '_' . $this->url_hash;
	}


	protected function get_meta_key() {

		return 'xs_shared_count_' . intval($this->post_id) . '_' . $this->key;
	}


	public function increase_share_count_by_one() {

		$opt_key = $this->get_meta_key();

		$old = get_post_meta($this->post_id, $opt_key, true);

		$count = intval($old) + 1;

		return update_post_meta($this->post_id, $opt_key, $count);
	}


	public function get_url_share_count() {

		$opt_key = $this->get_meta_key();

		$old = get_post_meta($this->post_id, $opt_key, true);

		return intval($old);
	}
}