Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace MoSfSyncSalesforce\Handler; defined("\x41\102\x53\120\101\x54\110"..
Decoded Output download
<?php
namespace MoSfSyncSalesforce\Handler;
defined("ABSPATH") || exit;
use MoSfSyncSalesforce\Helper\PluginConstants;
use MoSfSyncSalesforce\Handler\Object_Sync_Sf_WordPress_Transient;
use MoSfSyncSalesforce\Helper\view\PaidMemberShipProIntegration;
include plugin_dir_path(__DIR__) . "Helper/view/PaidMemberShipProIntegration.php";
class Object_Sync_Sf_WordPress
{
public $version;
public $file;
public $wpdb;
public $slug;
public $option_prefix;
public $logging;
public $mappings;
public $wordpress_objects;
public $options;
public $sfwp_transients;
public $debug;
public function __construct()
{
global $wpdb;
$this->version = PluginConstants::VERSION;
$this->file = MOSF_DIRC;
$this->wpdb = $wpdb;
$this->option_prefix = PluginConstants::OPTION_PREFIX;
add_action("admin_init", function () {
$this->wordpress_objects = $this->get_object_types();
});
$this->options = array("cache" => false, "cache_expiration" => $this->cache_expiration("wordpress_data_cache", 86400), "type" => "read");
$this->sfwp_transients = new Object_Sync_Sf_WordPress_Transient("mo_sfwp_transients");
}
public function get_object_types()
{
$ce = array("user", "comment", "category", "tag");
$wP = array_merge(get_post_types(), $ce);
$wP = apply_filters($this->option_prefix . "add_more_wordpress_types", $wP);
$wi = apply_filters($this->option_prefix . "remove_wordpress_types", array("wp_log", "scheduled-action", "revision"));
if (empty($wi)) {
goto UC;
}
$wP = array_diff($wP, $wi);
UC:
sort($wP);
return $wP;
}
public function cache_expiration($Kr, $ED)
{
$GO = get_site_option($Kr, $ED);
return $GO;
}
public function get_wordpress_object_data($Wf, $aC, $Kk = false)
{
$Ky = array();
$VF = $this->get_wordpress_table_structure($Wf);
$Fn = $VF["meta_table"];
$Iy = maybe_unserialize($VF["meta_methods"]);
$sC = $VF["content_table"];
$CR = maybe_unserialize($VF["content_methods"]);
$wM = $VF["id_field"];
$Pt = $VF["object_name"];
$kl = $VF["where"];
$cX = $VF["ignore_keys"];
if (!(true === $Kk)) {
goto VX;
}
$Ky = array();
$Ky[$wM] = $aC;
return $Ky;
VX:
if ("user" === $Wf) {
goto Vp;
}
if ("post" === $Wf || "attachment" === $Wf) {
goto RR;
}
if ("category" === $Wf || "tag" === $Wf || "post_tag" === $Wf) {
goto bp;
}
if ("comment" === $Wf) {
goto xa;
}
$Hs = get_post($aC);
goto A2;
Vp:
$Hs = get_userdata($aC);
goto A2;
RR:
$Hs = get_post($aC);
goto A2;
bp:
$Hs = get_term($aC);
goto A2;
xa:
$Hs = get_comment($aC);
A2:
if (is_object($Hs)) {
goto HE;
}
return $Ky;
HE:
$uW = $this->get_wordpress_object_fields($Wf);
foreach ($uW as $Ac => $mT) {
$nr = $mT["key"];
$Ky[$nr] = $Hs->{$nr};
dQ:
}
z_:
$Ky = apply_filters($this->option_prefix . "wordpress_object_data", $Ky, $Wf);
return $Ky;
}
public function get_wordpress_table_structure($Wf)
{
if ("attachment" === $Wf) {
goto BB;
}
if ("pmpro_orders" === $Wf) {
goto M3;
}
if ("user" === $Wf) {
goto Q6;
}
if ("post" === $Wf) {
goto qX;
}
if ("category" === $Wf || "tag" === $Wf || "post_tag" === $Wf) {
goto cW;
}
if ("comment" === $Wf) {
goto Yy;
}
$VF = array("object_name" => "post", "content_methods" => array("create" => "wp_insert_post", "read" => "get_posts", "update" => "wp_update_post", "delete" => "wp_delete_post", "match" => "get_posts"), "meta_methods" => array("create" => "add_post_meta", "read" => "get_post_meta", "update" => "update_post_meta", "delete" => "delete_post_meta", "match" => "WP_Query"), "content_table" => $this->wpdb->prefix . "posts", "id_field" => "ID", "meta_table" => $this->wpdb->prefix . "postmeta", "meta_join_field" => "post_id", "where" => "AND " . $this->wpdb->prefix . "posts.post_type = "" . $Wf . """, "ignore_keys" => array());
goto K6;
BB:
$VF = array("object_name" => "post", "content_methods" => array("create" => "wp_insert_attachment", "read" => "get_posts", "update" => "wp_insert_attachment", "delete" => "wp_delete_attachment", "match" => "get_posts"), "meta_methods" => array("create" => "wp_generate_attachment_metadata", "read" => "wp_get_attachment_metadata", "update" => "wp_update_attachment_metadata", "delete" => '', "match" => "WP_Query"), "content_table" => $this->wpdb->prefix . "posts", "id_field" => "ID", "meta_table" => $this->wpdb->prefix . "postmeta", "meta_join_field" => "post_id", "where" => "AND " . $this->wpdb->prefix . "posts.post_type = "" . $Wf . """, "ignore_keys" => array());
goto K6;
M3:
$VF = array("object_name" => "pmpro_membership_order", "content_methods" => array("create" => "mo_sf_sync_create_order", "read" => "mo_sf_sync_getMemberOrderByCode", "update" => "mo_sf_sync_update_order", "delete" => '', "match" => ''), "meta_methods" => array("create" => '', "read" => "get_pmpro_membership_order_meta", "update" => "update_pmpro_membership_order_meta", "delete" => "delete_pmpro_membership_order_meta", "match" => ''), "content_table" => "wp_pmpro_membership_orders", "id_field" => "id", "meta_table" => "wp_pmpro_membership_ordermeta", "meta_join_field" => "pmpro_membership_order_id", "where" => '', "ignore_keys" => array());
goto K6;
Q6:
$HI = array("create" => "update_user_meta", "read" => "get_user_meta", "update" => "update_user_meta", "delete" => "delete_user_meta");
$VF = array("object_name" => "user", "content_methods" => array("create" => "wp_insert_user", "read" => "get_user_by", "update" => "wp_update_user", "delete" => "wp_delete_user", "match" => "get_user_by"), "meta_methods" => $HI, "content_table" => "wp_users", "id_field" => "ID", "meta_table" => "wp_usermeta", "meta_join_field" => "user_id", "where" => '', "ignore_keys" => array("user_pass", "user_activation_key", "session_tokens"));
goto K6;
qX:
$VF = array("object_name" => "post", "content_methods" => array("create" => "wp_insert_post", "read" => "get_posts", "update" => "wp_update_post", "delete" => "wp_delete_post", "match" => "get_posts"), "meta_methods" => array("create" => "add_post_meta", "read" => "get_post_meta", "update" => "update_post_meta", "delete" => "delete_post_meta", "match" => "WP_Query"), "content_table" => $this->wpdb->prefix . "posts", "id_field" => "ID", "meta_table" => $this->wpdb->prefix . "postmeta", "meta_join_field" => "post_id", "where" => "AND " . $this->wpdb->prefix . "posts.post_type = "" . $Wf . """, "ignore_keys" => array());
goto K6;
cW:
$VF = array("object_name" => "term", "content_methods" => array("create" => "wp_insert_term", "read" => "get_term_by", "update" => "wp_update_term", "delete" => "wp_delete_term", "match" => "get_term_by"), "meta_methods" => array("create" => "add_term_meta", "read" => "get_term_meta", "update" => "update_term_meta", "delete" => "delete_metadata", "match" => "WP_Term_Query"), "content_table" => $this->wpdb->prefix . "terms", "id_field" => "term_id", "meta_table" => array($this->wpdb->prefix . "termmeta", $this->wpdb->prefix . "term_taxonomy"), "meta_join_field" => "term_id", "where" => '', "ignore_keys" => array());
goto K6;
Yy:
$VF = array("object_name" => "comment", "content_methods" => array("create" => "wp_new_comment", "read" => "get_comments", "update" => "wp_update_comment", "delete" => "wp_delete_comment", "match" => "get_comments"), "meta_methods" => array("create" => "add_comment_meta", "read" => "get_comment_meta", "update" => "update_comment_meta", "delete" => "delete_comment_metadata", "match" => "WP_Comment_Query"), "content_table" => $this->wpdb->prefix . "comments", "id_field" => "comment_ID", "meta_table" => $this->wpdb->prefix . "commentmeta", "meta_join_field" => "comment_id", "where" => '', "ignore_keys" => array());
K6:
return $VF;
}
public function get_wordpress_object_fields($Ky, $wM = "ID")
{
$VF = $this->get_wordpress_table_structure($Ky);
$Fn = $VF["meta_table"];
$Iy = maybe_unserialize($VF["meta_methods"]);
$sC = $VF["content_table"];
$CR = maybe_unserialize($VF["content_methods"]);
$wM = $VF["id_field"];
$Pt = $VF["object_name"];
$kl = $VF["where"];
$cX = $VF["ignore_keys"];
$ys = array();
if (true === $this->options["cache"] && "write" !== $this->options["cache"]) {
goto WY;
}
$ys["data"] = $this->object_fields($Pt, $wM, $sC, $CR, $Fn, $Iy, $kl, $cX);
$ys["from_cache"] = false;
$ys["cached"] = false;
goto ea;
WY:
$pw = $this->cache_get($Ky, array("data", "meta"));
if (is_array($pw)) {
goto FW;
}
$ys["data"] = $this->object_fields($Pt, $wM, $sC, $CR, $Fn, $Iy, $kl, $cX);
if (!empty($ys["data"])) {
goto mq;
}
$ys["cached"] = false;
goto xh;
mq:
$ys["cached"] = $this->cache_set($Ky, array("data", "meta"), $ys["data"], $this->options["cache_expiration"]);
xh:
$ys["from_cache"] = false;
goto T2;
FW:
$ys["data"] = $pw;
$ys["from_cache"] = true;
$ys["cached"] = true;
T2:
ea:
$ys = apply_filters($this->option_prefix . "wordpress_object_fields", $ys, $Ky);
error_log("object fields => " . print_r($ys["data"], true));
return $ys["data"];
}
public function cache_get($pL, $u1)
{
if (is_array($u1)) {
goto cE;
}
$u1 .= $pL;
goto Jg;
cE:
$u1[] = $pL;
array_multisort($u1);
Jg:
$ON = md5(wp_json_encode($u1));
return $this->sfwp_transients->get($ON);
}
private function object_fields($Pt, $wM, $sC, $CR, $Fn, $Iy, $kl, $cX)
{
$Zg = $this->wpdb->get_col("DESC {$sC}", 0);
$YD = $this->wpdb->get_col("DESC {$sC}", 1);
if (!is_array($Fn)) {
goto zt;
}
$WY = $Fn[1];
$Fn = $Fn[0];
zt:
$tO = "\xd
\x9\x9SELECT DISTINCT " . $Fn . ".meta_key\xd
FROM " . $sC . "\xd
LEFT JOIN " . $Fn . "\xd\xa ON " . $sC . "." . $wM . " = " . $Fn . "." . $Pt . "_id\xd\xa WHERE " . $Fn . ".meta_key != ""
\xa \x9" . $kl . "\xd
\x9\x9";
$pA = $this->wpdb->get_results($tO);
$YT = array();
foreach ($Zg as $Ac => $mT) {
if (in_array($mT, $cX, true)) {
goto Nj;
}
$vQ = true;
if (!($mT === $wM)) {
goto gJ;
}
$vQ = false;
gJ:
$vQ = apply_filters($this->option_prefix . "wordpress_field_is_editable", $vQ, $mT);
$YT[] = array("key" => $mT, "table" => $sC, "methods" => serialize($CR), "type" => $YD[$Ac], "editable" => $vQ);
Nj:
PQ:
}
LQ:
foreach ($pA as $Ac => $mT) {
if (in_array($mT->meta_key, $cX, true)) {
goto QD;
}
$vQ = true;
if (!($mT === $wM)) {
goto M4;
}
$vQ = false;
M4:
$vQ = apply_filters($this->option_prefix . "wordpress_field_is_editable", $vQ, $mT->meta_key);
$YT[] = array("key" => $mT->meta_key, "table" => $Fn, "methods" => serialize($Iy), "editable" => $vQ);
QD:
iV:
}
zf:
if (!("term" === $Pt)) {
goto iz;
}
$zo = $this->wpdb->get_col("DESC {$WY}", 0);
foreach ($zo as $Ac => $mT) {
$rb = array_search($mT, array_column($YT, "key"), true);
if (!(0 !== $rb)) {
goto Ce;
}
$vQ = true;
if (!($mT === $wM)) {
goto mZ;
}
$vQ = false;
mZ:
$vQ = apply_filters($this->option_prefix . "wordpress_field_is_editable", $vQ, $mT);
$YT[] = array("key" => $mT, "table" => $WY, "methods" => serialize($CR), "editable" => $vQ);
Ce:
Cw:
}
wL:
iz:
return $YT;
}
public function cache_set($pL, $u1, $Hs, $GO = '')
{
if (is_array($u1)) {
goto dN;
}
$u1 .= $pL;
goto Jf;
dN:
$u1[] = $pL;
array_multisort($u1);
Jf:
$ON = md5(wp_json_encode($u1));
if (!('' === $GO)) {
goto hE;
}
$GO = $this->options["cache_expiration"];
hE:
return $this->sfwp_transients->set($ON, $Hs, $GO);
}
public function object_create($J5, $rH)
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["id_field"];
switch ($J5) {
case "user":
$FH = $this->user_create($rH, $wM);
goto bN;
case "post":
$FH = $this->post_create($rH, $wM);
goto bN;
case "attachment":
$FH = $this->attachment_create($rH, $wM);
goto bN;
case "category":
case "tag":
case "post_tag":
$FH = $this->term_create($rH, $J5, $wM);
goto bN;
case "comment":
$FH = $this->comment_create($rH, $wM);
goto bN;
default:
if (!has_filter($this->option_prefix . "create_custom_wordpress_item")) {
goto tX;
}
$FH = apply_filters($this->option_prefix . "create_custom_wordpress_item", array("params" => $rH, "name" => $J5, "id_field" => $wM));
goto Fb;
tX:
$FH = $this->post_create($rH, $wM, $J5);
Fb:
goto bN;
}
GJ:
bN:
return $FH;
}
private function user_create($rH, $wM = "ID")
{
$iH = $rH["user_email"]["value"];
$Ut = $rH["user_email"]["value"];
if (isset($rH["user_login"]["value"])) {
goto Mh;
}
$rH["user_login"] = array("value" => $iH, "method_modify" => "wp_insert_user", "method_read" => "get_user_by");
goto KL;
Mh:
$iH = $rH["user_login"]["value"];
KL:
if (false === username_exists($iH)) {
goto No;
}
$nc = username_exists($iH);
goto VN;
No:
$rH["user_pass"] = array("value" => wp_generate_password(12, false), "method_modify" => "wp_insert_user", "method_read" => "get_user_by");
$tv = array();
$J0 = $this->get_wordpress_table_structure("user");
foreach ($rH as $Ac => $mT) {
if (!in_array($mT["method_modify"], $J0["content_methods"], true)) {
goto fa;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
fa:
lF:
}
N6:
$nc = wp_insert_user($tv);
if (is_wp_error($nc)) {
goto WX;
}
$Hn = $this->create_wp_meta($rH, $nc, "user");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_user_data", $nc, $rH, "create");
wp_new_user_notification($nc, null, "both");
goto ya;
WX:
$v1 = false;
$errors = $nc;
ya:
VN:
if (is_wp_error($nc)) {
goto kM;
}
$v1 = true;
$errors = array();
goto dp;
kM:
$v1 = false;
$errors = $nc;
dp:
$FH = array("data" => array($wM => $nc, "success" => $v1), "errors" => $errors);
return $FH;
}
private function create_wp_meta($rH, $h3, $LB)
{
$v1 = true;
$errors = array();
if (!(!is_wp_error($h3) && is_array($rH) && !empty($rH))) {
goto rm;
}
foreach ($rH as $Ac => $mT) {
if (!('' === $mT["value"])) {
goto x4;
}
goto wA;
x4:
$EA = $mT["method_modify"];
$Yj = $EA($h3, $Ac, $mT["value"]);
if (!(false === $Yj)) {
goto EP;
}
$v1 = false;
$errors[] = array("message" => sprintf(esc_html__("Tried to add %1$s meta with method %2$s.", "object-sync-for-salesforce"), esc_attr($LB), esc_html($EA)), "key" => $Ac, "value" => $mT);
EP:
wA:
}
uV:
rm:
$Hn = array("success" => $v1, "errors" => $errors);
return $Hn;
}
private function post_create($rH, $wM = "ID", $dR = "post")
{
$tv = array();
$J0 = $this->get_wordpress_table_structure($dR);
foreach ($rH as $Ac => $mT) {
if (!(is_array($mT) && in_array($mT["method_modify"], $J0["content_methods"], true))) {
goto ef;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
ef:
y4:
}
bz:
if (!('' !== $dR)) {
goto FI;
}
$tv["post_type"] = $dR;
FI:
if (isset($tv["post_title"])) {
goto p3;
}
$tv["post_title"] = " ";
p3:
if (isset($tv["post_content"])) {
goto tR;
}
$tv["post_content"] = " ";
tR:
$BM = wp_insert_post($tv, true);
if (is_wp_error($BM)) {
goto iX;
}
if (!isset($rH["RecordTypeId"]["value"])) {
goto cC;
}
$rH["RecordTypeId"]["method_modify"] = "update_post_meta";
$rH["RecordTypeId"]["method_read"] = "get_post_meta";
cC:
$Hn = $this->create_wp_meta($rH, $BM, "post");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_post_data", $BM, $rH, "create");
goto SE;
iX:
$v1 = false;
$errors = $BM;
SE:
if (is_wp_error($BM)) {
goto qe;
}
$v1 = true;
$errors = array();
goto y2;
qe:
$v1 = false;
$errors = $BM;
y2:
$FH = array("data" => array($wM => $BM, "success" => $v1), "errors" => $errors);
return $FH;
}
private function attachment_create($rH, $wM = "ID")
{
$tv = array();
$J0 = $this->get_wordpress_table_structure("attachment");
foreach ($rH as $Ac => $mT) {
if (!in_array($mT["method_modify"], $J0["content_methods"], true)) {
goto Nf;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
Nf:
Nv:
}
zm:
$rH = apply_filters($this->option_prefix . "set_initial_attachment_data", $rH);
if (isset($rH["filename"]["value"])) {
goto FG;
}
$qF = false;
goto wk;
FG:
$qF = $rH["filename"]["value"];
wk:
if (isset($rH["parent"]["value"])) {
goto b_;
}
$GK = 0;
goto v2;
b_:
$GK = $rH["parent"]["value"];
v2:
$kU = wp_insert_attachment($tv, $qF, $GK);
if (is_wp_error($kU)) {
goto Jv;
}
$v1 = true;
$errors = array();
if (!(false !== $qF)) {
goto rC;
}
require_once ABSPATH . "wp-admin/includes/image.php";
$JH = wp_generate_attachment_metadata($kU, $qF);
wp_update_attachment_metadata($kU, $JH);
rC:
do_action($this->option_prefix . "set_more_attachment_data", $kU, $rH, "create");
goto pe;
Jv:
$v1 = false;
$errors = $kU;
pe:
$FH = array("data" => array($wM => $kU, "success" => $v1), "errors" => $errors);
return $FH;
}
private function term_create($rH, $zo, $wM = "ID")
{
if (!("tag" === $zo)) {
goto zF;
}
$zo = "post_tag";
zF:
$tv = array();
$J0 = $this->get_wordpress_table_structure($zo);
$u1 = array();
foreach ($rH as $Ac => $mT) {
if (!("name" === $Ac)) {
goto id;
}
$J5 = $mT["value"];
unset($rH[$Ac]);
id:
if (!(in_array($mT["method_modify"], $J0["content_methods"], true) && "name" !== $Ac)) {
goto LE;
}
$u1[$Ac] = $mT["value"];
unset($rH[$Ac]);
LE:
GT:
}
h_:
if (!isset($J5)) {
goto Pa;
}
$sa = wp_insert_term($J5, $zo, $u1);
Pa:
if (is_wp_error($sa)) {
goto Ds;
}
$Hv = $sa["{$wM}"];
$Hn = $this->create_wp_meta($rH, $Hv, "term");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_term_data", $Hv, $rH, "create");
goto Uh;
Ds:
$v1 = false;
$errors = $sa;
Uh:
if (is_wp_error($sa)) {
goto Yr;
}
$v1 = true;
$errors = array();
goto Wh;
Yr:
$v1 = false;
$errors = $sa;
Wh:
$FH = array("data" => array($wM => $Hv, "success" => $v1), "errors" => $errors);
return $FH;
}
private function comment_create($rH, $wM = "comment_ID")
{
$tv = array();
$J0 = $this->get_wordpress_table_structure("comment");
foreach ($rH as $Ac => $mT) {
if (!in_array($mT["method_modify"], $J0["content_methods"], true)) {
goto bE;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
bE:
FQ:
}
lB:
if (isset($tv["comment_author"])) {
goto dk;
}
$tv["comment_author"] = '';
dk:
if (isset($tv["comment_author_IP"])) {
goto Of;
}
$tv["comment_author_IP"] = '';
Of:
if (isset($tv["comment_author_email"])) {
goto q1;
}
$tv["comment_author_email"] = '';
q1:
if (isset($tv["comment_author_url"])) {
goto i3;
}
$tv["comment_author_url"] = '';
i3:
if (isset($tv["comment_type"])) {
goto Iz;
}
$tv["comment_type"] = '';
Iz:
$cz = wp_new_comment($tv);
if (is_wp_error($cz)) {
goto La;
}
$Hn = $this->create_wp_meta($rH, $cz, "comment");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_comment_data", $cz, $rH, "create");
goto Ir;
La:
$v1 = false;
$errors = $cz;
Ir:
if (is_wp_error($cz)) {
goto bF;
}
$v1 = true;
$errors = array();
goto b2;
bF:
$v1 = false;
$errors = $cz;
b2:
$FH = array("data" => array($wM => $cz, "success" => $v1), "errors" => $errors);
return $FH;
}
public function object_upsert($J5, $Ac, $mT, $rH, $yA = false, $El = array(), $eC = false)
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["id_field"];
if (!isset($rH[$Ac])) {
goto PH;
}
unset($rH[$Ac]);
PH:
$Ac = apply_filters($this->option_prefix . "modify_upsert_key", $Ac);
$mT = apply_filters($this->option_prefix . "modify_upsert_value", $mT);
switch ($J5) {
case "user":
$FH = $this->user_upsert($Ac, $mT, $rH, $wM, $El, $yA, $eC);
goto mm;
case "post":
$FH = $this->post_upsert($Ac, $mT, $El, $rH, $wM, $yA, $J5, $eC);
goto mm;
case "attachment":
$FH = $this->attachment_upsert($Ac, $mT, $rH, $wM, $El, $eC);
goto mm;
case "category":
case "tag":
case "post_tag":
$FH = $this->term_upsert($Ac, $mT, $rH, $J5, $wM, $eC, $El);
goto mm;
case "comment":
$FH = $this->comment_upsert($Ac, $mT, $El, $rH, $wM, $yA, $eC);
goto mm;
case "pmpro_orders":
$FH = $this->pmpro_orders_upsert($J5, $Ac, $mT, $rH, $wM);
goto mm;
default:
if (!has_filter($this->option_prefix . "upsert_custom_wordpress_item")) {
goto ip;
}
$FH = apply_filters($this->option_prefix . "upsert_custom_wordpress_item", array("key" => $Ac, "value" => $mT, "methods" => $El, "params" => $rH, "id_field" => $wM, "pull_to_drafts" => $yA, "name" => $J5, "check_only" => $eC));
goto mW;
ip:
$FH = $this->post_upsert($Ac, $mT, $El, $rH, $wM, $yA, $J5, $eC);
mW:
goto mm;
}
bl:
mm:
return $FH;
}
public function pmpro_orders_upsert($J5, $Ac, $mT, $rH, $wM)
{
$FH = PaidMemberShipProIntegration::mo_sf_sync_get_order_id($Ac, $mT);
return $FH;
}
private function user_upsert($Ac, $mT, $rH, $wM = "ID", $El = array(), $yA = false, $eC = false)
{
$uP = "WP_User_Query";
if ('' !== $uP) {
goto q8;
}
$rH[$Ac] = array("value" => $mT, "method_modify" => $El["method_modify"], "method_read" => $El["method_read"]);
if (!isset($rH["user_email"]["value"])) {
goto Ty;
}
$iH = $rH["user_email"]["value"];
$Ut = $rH["user_email"]["value"];
Ty:
if (!isset($rH["user_login"]["value"])) {
goto YO;
}
$iH = $rH["user_login"]["value"];
YO:
$vq = username_exists($iH);
if (false === $vq && false === $eC) {
goto dS;
}
if (true === $eC) {
goto yN;
}
$nc = $vq;
goto Xo;
dS:
$FH = $this->user_create($rH);
return $FH;
goto Xo;
yN:
return $vq;
Xo:
goto LL;
q8:
if (class_exists($uP)) {
goto N5;
}
$user = $uP(str_replace("user_", '', $Ac), $mT);
goto vi;
N5:
$u1 = array("meta_query" => array(array("key" => $Ac, "value" => $mT)));
$De = new $uP($u1);
$Gh = $De->get_results();
if (empty($Gh)) {
goto V5;
}
$user = $Gh[0];
V5:
vi:
if (isset($user) && isset($user->{$wM})) {
goto LY;
}
if (false === $eC) {
goto I1;
}
return null;
goto Ik;
LY:
$nc = $user->{$wM};
if (!(true === $eC)) {
goto ML;
}
return $nc;
ML:
if (isset($El["method_update"])) {
goto A5;
}
$uP = $El["method_modify"];
goto Rx;
A5:
$uP = $El["method_update"];
Rx:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
goto Ik;
I1:
if (isset($El["method_create"])) {
goto WP;
}
$uP = $El["method_modify"];
goto fv;
WP:
$uP = $El["method_create"];
fv:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
$FH = $this->user_create($rH);
return $FH;
Ik:
LL:
if (!isset($nc)) {
goto Uf;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["method_modify"] = $El["method_update"];
rS:
}
Dy:
$FH = $this->user_update($nc, $rH);
return $FH;
Uf:
if (isset($this->logging)) {
goto WV;
}
if (class_exists("Object_Sync_Sf_Logging")) {
goto pN;
}
goto CS;
WV:
$tR = $this->logging;
goto CS;
pN:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
CS:
$CG = "error";
$el = sprintf(esc_html__("%1$s: Users: Tried to run user_upsert, and ended up without a user id", "object-sync-for-salesforce"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function user_update($nc, $rH, $wM = "ID")
{
$tv = array();
$tv[$wM] = $nc;
foreach ($rH as $Ac => $mT) {
if (!("user_email" === $Ac && email_exists($mT["value"]))) {
goto aj;
}
unset($rH[$Ac]);
goto AT;
aj:
if (!("user_login" === $Ac && username_exists($mT["value"]))) {
goto H1;
}
unset($rH[$Ac]);
goto AT;
H1:
if (!("wp_update_user" === $mT["method_modify"])) {
goto m7;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
m7:
AT:
}
VI:
$nc = wp_update_user($tv);
if (is_wp_error($nc)) {
goto iE;
}
$Hn = $this->update_wp_meta($rH, $nc, "user");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_user_data", $nc, $rH, "update");
goto zS;
iE:
$v1 = false;
$errors = $nc;
zS:
$FH = array("data" => array($wM => $nc, "success" => $v1), "errors" => $errors);
return $FH;
}
private function update_wp_meta($rH, $h3, $LB)
{
$v1 = true;
$qC = false;
$errors = array();
if (!(!is_wp_error($h3) && is_array($rH) && !empty($rH))) {
goto Av;
}
$qC = true;
foreach ($rH as $Ac => $mT) {
$EA = $mT["method_modify"];
if (!('' === $mT["value"])) {
goto pi;
}
$EA = isset($mT["method_delete"]) ? $mT["method_delete"] : $mT["method_modify"];
pi:
$NO = $mT["method_read"];
$Yj = $EA($h3, $Ac, $mT["value"]);
if (!(false === $Yj)) {
goto vA;
}
$qC = false;
if (is_array($mT["value"])) {
goto wT;
}
$Uh = (string) $mT["value"];
goto vS;
wT:
$Uh = maybe_serialize($mT["value"]);
vS:
if (is_array($NO($h3, $Ac, true))) {
goto fc;
}
$eP = (string) $NO($h3, $Ac, true);
goto j0;
fc:
$eP = maybe_serialize($NO($h3, $Ac, true));
j0:
if (!($eP !== $Uh)) {
goto UB;
}
$errors[] = array("message" => sprintf(esc_html__("Unable to update %1$s meta key %2$s with method %3$s. The stored value is %4$s and the new value should be %5$s.", "object-sync-for-salesforce"), esc_attr($LB), esc_attr($Ac), esc_attr($EA), wp_kses_post($eP), wp_kses_post($Uh)));
UB:
vA:
ME:
}
EZ:
Av:
$Hn = array("success" => $v1, "changed" => $qC, "errors" => $errors);
return $Hn;
}
private function post_upsert($Ac, $mT, $El = array(), $rH = array(), $wM = "ID", $yA = false, $dR = "post", $eC = false)
{
$uP = $El["method_match"];
if ('' !== $uP) {
goto ra;
}
$rH[$Ac] = array("value" => $mT, "method_modify" => $El["method_modify"], "method_read" => $El["method_read"]);
if (!isset($rH["post_title"]["value"])) {
goto iC;
}
$el = $rH["post_title"]["value"];
iC:
if (isset($rH["post_content"]["value"])) {
goto G0;
}
$tv = '';
goto pl;
G0:
$tv = $rH["post_content"]["value"];
pl:
if (isset($rH["post_date"]["value"])) {
goto VV;
}
$UZ = '';
goto ox;
VV:
$UZ = $rH["post_date"]["value"];
ox:
$vq = post_exists($el, $tv, $UZ);
if (0 === $vq && false === $eC) {
goto eX;
}
if (true === $eC) {
goto FM;
}
$BM = $vq;
goto V3;
eX:
$FH = $this->post_create($rH, $wM, $dR);
return $FH;
goto V3;
FM:
return $vq;
V3:
return $FH;
goto K8;
ra:
$u1 = array();
if ("post_title" === $Ac) {
goto QW;
}
$u1[$Ac] = $mT;
goto Re;
QW:
$rH["post_title"] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
$u1["name"] = sanitize_title($mT);
Re:
$u1["post_type"] = $dR;
$At = array("publish");
if (!(true === filter_var($yA, FILTER_VALIDATE_BOOLEAN))) {
goto Lg;
}
$At[] = "draft";
Lg:
$u1["post_status"] = $At;
if (class_exists($uP)) {
goto H0;
}
$gY = $uP($u1);
goto Ey;
H0:
unset($u1[$Ac]);
$u1["meta_query"] = array(array("key" => $Ac, "value" => $mT));
$De = new $uP($u1);
$gY = $De->get_posts();
Ey:
if (isset($gY) && isset($gY[0]->{$wM})) {
goto O7;
}
if (false === $eC) {
goto Ih;
}
return null;
goto nT;
O7:
$BM = $gY[0]->{$wM};
if (!(true === $eC)) {
goto Ye;
}
return $BM;
Ye:
if (isset($El["method_update"])) {
goto uJ;
}
$uP = $El["method_modify"];
goto Kc;
uJ:
$uP = $El["method_update"];
Kc:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
goto nT;
Ih:
if (isset($El["method_create"])) {
goto t5;
}
$uP = $El["method_modify"];
goto QT;
t5:
$uP = $El["method_create"];
QT:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
$FH = $this->post_create($rH, $wM, $dR);
return $FH;
nT:
K8:
if (!isset($BM)) {
goto s7;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["method_modify"] = $El["method_update"];
NB:
}
Kl:
$FH = $this->post_update($BM, $rH, $wM, $dR);
return $FH;
s7:
}
private function post_update($BM, $rH, $wM = "ID", $dR = '')
{
$tv = array();
$tv[$wM] = $BM;
foreach ($rH as $Ac => $mT) {
if (!("wp_update_post" === $mT["method_modify"])) {
goto wC;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
wC:
jj:
}
S7:
if (!('' !== $dR)) {
goto X2;
}
$tv["post_type"] = $dR;
X2:
$BM = wp_update_post($tv, true);
if (is_wp_error($BM)) {
goto xS;
}
if (!isset($rH["RecordTypeId"]["value"])) {
goto lu;
}
$rH["RecordTypeId"]["method_modify"] = "update_post_meta";
$rH["RecordTypeId"]["method_read"] = "get_post_meta";
lu:
$Hn = $this->update_wp_meta($rH, $BM, "post");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_post_data", $BM, $rH, "update");
goto yf;
xS:
$v1 = false;
$errors = $BM;
yf:
$FH = array("data" => array($wM => $BM, "success" => $v1), "errors" => $errors);
return $FH;
}
private function attachment_upsert($Ac, $mT, $rH, $wM = "ID", $El = array(), $eC = false)
{
$uP = $El["method_match"];
if ('' !== $uP) {
goto hT;
}
$rH[$Ac] = array("value" => $mT, "method_modify" => $El["method_modify"], "method_read" => $El["method_read"]);
if (!isset($rH["post_title"]["value"])) {
goto u2;
}
$el = $rH["post_title"]["value"];
u2:
if (isset($rH["post_content"]["value"])) {
goto vr;
}
$tv = '';
goto ek;
vr:
$tv = $rH["post_content"]["value"];
ek:
if (isset($rH["post_date"]["value"])) {
goto oZ;
}
$UZ = '';
goto JS;
oZ:
$UZ = $rH["post_date"]["value"];
JS:
$vq = post_exists($el, $tv, $UZ);
if (0 === $vq && false === $eC) {
goto Z8;
}
if (true === $eC) {
goto qT;
}
$kU = $vq;
goto ce;
Z8:
$FH = $this->attachment_create($rH);
return $FH;
goto ce;
qT:
return $vq;
ce:
return $FH;
goto rH;
hT:
$u1 = array();
if ("post_title" === $Ac) {
goto AC;
}
$u1[$Ac] = $mT;
goto dG;
AC:
$rH["post_title"] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
$u1["name"] = sanitize_title($mT);
dG:
$u1["post_type"] = "attachment";
if (class_exists($uP)) {
goto hv;
}
$gY = $uP($u1);
goto eA;
hv:
unset($u1[$Ac]);
$u1["meta_query"] = array(array("key" => $Ac, "value" => $mT));
$De = new $uP($u1);
$gY = $De->get_results();
eA:
if (isset($gY) && isset($gY[0]->{$wM})) {
goto P1;
}
if (false === $eC) {
goto vk;
}
return null;
goto KS;
P1:
$kU = $gY[0]->{$wM};
if (!(true === $eC)) {
goto Gj;
}
return $kU;
Gj:
if (isset($El["method_update"])) {
goto ht;
}
$uP = $El["method_modify"];
goto U8;
ht:
$uP = $El["method_update"];
U8:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
goto KS;
vk:
if (isset($El["method_create"])) {
goto Kh;
}
$uP = $El["method_modify"];
goto WC;
Kh:
$uP = $El["method_create"];
WC:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
$FH = $this->attachment_create($rH);
return $FH;
KS:
rH:
if (!isset($kU)) {
goto Kv;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["method_modify"] = $El["method_update"];
CR:
}
xw:
$FH = $this->attachment_update($kU, $rH);
return $FH;
Kv:
if (isset($this->logging)) {
goto Vj;
}
if (class_exists("Object_Sync_Sf_Logging")) {
goto xR;
}
goto wa;
Vj:
$tR = $this->logging;
goto wa;
xR:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
wa:
$CG = "error";
$el = sprintf(esc_html__("%1$s: Attachments: Tried to run attachment_upsert, and ended up without an attachment id", "object-sync-for-salesforce"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function attachment_update($kU, $rH, $wM = "ID")
{
$tv = array();
$tv[$wM] = $kU;
foreach ($rH as $Ac => $mT) {
if (!("wp_insert_attachment" === $mT["method_modify"])) {
goto V6;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
V6:
Wm:
}
fi:
if (isset($rH["filename"]["value"])) {
goto L_;
}
$qF = false;
goto K2;
L_:
$qF = $rH["filename"]["value"];
K2:
if (isset($rH["parent"]["value"])) {
goto Ry;
}
$GK = 0;
goto uv;
Ry:
$GK = $rH["parent"]["value"];
uv:
$kU = wp_insert_attachment($tv, $qF, $GK);
if (is_wp_error($kU)) {
goto zo;
}
$v1 = true;
$errors = array();
if (!(false !== $qF)) {
goto mY;
}
require_once ABSPATH . "wp-admin/includes/image.php";
$JH = wp_generate_attachment_metadata($kU, $qF);
mY:
$sg = array();
foreach ($rH as $Ac => $mT) {
$uP = $mT["method_modify"];
$sg[$Ac] = $mT["value"];
UH:
}
B2:
if (isset($JH)) {
goto hq;
}
$JH = $sg;
goto sS;
hq:
$JH = array_merge($JH, $sg);
sS:
$A0 = wp_update_attachment_metadata($kU, $JH);
if (!(false === $A0)) {
goto JV;
}
$v1 = false;
$errors[] = array("key" => $Ac, "value" => $mT);
JV:
if (!(0 !== $GK)) {
goto Pj;
}
set_post_thumbnail($Tx, $kU);
Pj:
do_action($this->option_prefix . "set_more_attachment_data", $kU, $rH, "update");
goto ay;
zo:
$v1 = false;
$errors = $kU;
ay:
$FH = array("data" => array($wM => $kU, "success" => $v1), "errors" => $errors);
return $FH;
}
private function term_upsert($Ac, $mT, $rH, $zo, $wM = "ID", $yA = false, $eC = false, $El = array())
{
if (!("tag" === $zo)) {
goto n5;
}
$zo = "post_tag";
n5:
$uP = $El["method_match"];
if ('' !== $uP) {
goto Fj;
}
$rH[$Ac] = array("value" => $mT, "method_modify" => $El["method_modify"], "method_read" => $El["method_read"]);
if (!isset($rH["name"]["value"])) {
goto E4;
}
$sa = $rH["name"]["value"];
E4:
if (isset($rH["parent"]["value"])) {
goto l3;
}
$GK = 0;
goto IC;
l3:
$GK = $rH["parent"]["value"];
IC:
if (function_exists("wpcom_vip_term_exists")) {
goto gZ;
}
$vq = term_exists($sa, $zo, $GK);
goto eK;
gZ:
$vq = wpcom_vip_term_exists($sa, $zo, $GK);
eK:
if (null === $vq && false === $eC) {
goto l_;
}
if (true === $eC) {
goto a4;
}
$Hv = $vq;
goto Jh;
l_:
$FH = $this->term_create($rH, $zo, $wM);
return $FH;
goto Jh;
a4:
return $vq;
Jh:
goto RK;
Fj:
if (class_exists($uP)) {
goto IM;
}
$sa = $uP($Ac, $mT, $zo);
goto mX;
IM:
$u1 = array("taxonomy" => $zo, "meta_key" => $Ac, "meta_value" => $mT);
$De = new $uP($u1);
$aR = $De->get_terms();
if (empty($aR)) {
goto R3;
}
$sa = $aR[0];
R3:
mX:
if (isset($sa) && isset($sa->{$wM})) {
goto Gs;
}
if (false === $eC) {
goto lE;
}
return null;
goto p6;
Gs:
$Hv = $sa->{$wM};
if (!(true === $eC)) {
goto u6;
}
return $Hv;
u6:
if (isset($El["method_update"])) {
goto Gl;
}
$uP = $El["method_modify"];
goto dU;
Gl:
$uP = $El["method_update"];
dU:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
goto p6;
lE:
if (isset($El["method_create"])) {
goto t9;
}
$uP = $El["method_modify"];
goto s_;
t9:
$uP = $El["method_create"];
s_:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
$FH = $this->term_create($rH, $zo, $wM);
return $FH;
p6:
RK:
if (!isset($Hv)) {
goto nk;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["method_modify"] = $El["method_update"];
oW:
}
nK:
$FH = $this->term_update($Hv, $rH, $zo, $wM);
return $FH;
nk:
if (isset($this->logging)) {
goto IZ;
}
if (class_exists("Object_Sync_Sf_Logging")) {
goto kz;
}
goto kI;
IZ:
$tR = $this->logging;
goto kI;
kz:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
kI:
$CG = "error";
$el = sprintf(esc_html__("%1$s: Terms: Tried to run term_upsert, and ended up without a term id", "object-sync-for-salesforce"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function term_update($Hv, $rH, $zo, $wM = "ID")
{
if (!("tag" === $zo)) {
goto Bc;
}
$zo = "post_tag";
Bc:
$u1 = array();
foreach ($rH as $Ac => $mT) {
if (!("wp_update_term" === $mT["method_modify"])) {
goto Ou;
}
$u1[$Ac] = $mT["value"];
unset($rH[$Ac]);
Ou:
Nh:
}
AI:
$sa = wp_update_term($Hv, $zo, $u1);
if (is_wp_error($sa)) {
goto iH;
}
$Hv = $sa["{$wM}"];
$Hn = $this->update_wp_meta($rH, $Hv, "term");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_term_data", $Hv, $rH, "update");
goto gc;
iH:
$v1 = false;
$errors = $sa;
gc:
if (is_wp_error($sa)) {
goto BC;
}
$v1 = true;
$errors = array();
goto Zt;
BC:
$v1 = false;
$errors = $sa;
Zt:
$FH = array("data" => array($wM => $Hv, "success" => $v1), "errors" => $errors);
return $FH;
}
private function comment_upsert($Ac, $mT, $El, $rH, $wM = "comment_ID", $yA = false, $eC = false)
{
$uP = $El["method_match"];
if (!("get_comment" === $uP)) {
goto aW;
}
$uP = "get_comments";
aW:
if ('' !== $uP) {
goto JL;
}
$rH[$Ac] = array("value" => $mT, "method_modify" => $El["method_modify"], "method_read" => $El["method_read"]);
if (!isset($rH["comment_author"]["value"])) {
goto Xt;
}
$tl = $rH["comment_author"]["value"];
Xt:
if (!isset($rH["comment_date"]["value"])) {
goto lC;
}
$c8 = $rH["comment_date"]["value"];
lC:
if (isset($rH["timezone"]["value"])) {
goto IK;
}
$cp = "blog";
goto SS;
IK:
$cp = $rH["timezone"]["value"];
SS:
$vq = comment_exists($tl, $c8, $cp);
if (null === $vq && false === $eC) {
goto bs;
}
if (true === $eC) {
goto mC;
}
$cz = $vq;
goto H4;
bs:
$FH = $this->comment_create($rH, $wM);
return $FH;
goto H4;
mC:
return $vq;
H4:
goto GK;
JL:
if (class_exists($uP)) {
goto Aj;
}
$BN = array();
if ("comment_author" === $Ac) {
goto VP;
}
$Ac = str_replace("comment_", '', $Ac);
$BN[$Ac] = $mT;
goto MG;
VP:
$BN["author__in"] = array($mT);
MG:
$va = $uP($BN);
goto xe;
Aj:
$u1 = array("meta_query" => array(array("key" => $Ac, "value" => $mT)));
$De = new $uP($u1);
$va = $De->get_comments();
if (empty($va)) {
goto k7;
}
$c9 = $Gh[0];
k7:
xe:
if (1 === count($va) && isset($va) && isset($va[0]->{$wM})) {
goto i1;
}
if (count($va) > 1) {
goto Ws;
}
if (false === $eC) {
goto YJ;
}
return null;
goto mj;
i1:
$c9 = $va[0];
$cz = $c9->{$wM};
if (!(true === $eC)) {
goto Ho;
}
return $cz;
Ho:
if (isset($El["method_update"])) {
goto dH;
}
$uP = $El["method_modify"];
goto hD;
dH:
$uP = $El["method_update"];
hD:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
goto mj;
Ws:
$CG = "error";
if (isset($this->logging)) {
goto Oz;
}
if (class_exists("Object_Sync_Sf_Logging")) {
goto Od;
}
goto cV;
Oz:
$tR = $this->logging;
goto cV;
Od:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
cV:
$tR->setup(sprintf(esc_html__("%1$s: Comments: there are %2$s comment matches for the Salesforce key %3$s with the value of %4$s. Here they are: %5$s", "object-sync-for-salesforce"), ucfirst(esc_attr($CG)), absint(count($va)), esc_html($Ac), esc_html($mT), esc_html(var_export($va))), '', 0, 0, $CG);
goto mj;
YJ:
if (isset($El["method_create"])) {
goto A0;
}
$uP = $El["method_modify"];
goto UQ;
A0:
$uP = $El["method_create"];
UQ:
$rH[$Ac] = array("value" => $mT, "method_modify" => $uP, "method_read" => $El["method_read"]);
$FH = $this->comment_create($rH, $wM);
return $FH;
mj:
GK:
if (!isset($cz)) {
goto qb;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["method_modify"] = $El["method_update"];
sF:
}
FJ:
$FH = $this->comment_update($cz, $rH, $wM);
return $FH;
qb:
if (isset($this->logging)) {
goto m6;
}
if (class_exists("Object_Sync_Sf_Logging")) {
goto XU;
}
goto Q0;
m6:
$tR = $this->logging;
goto Q0;
XU:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
Q0:
$CG = "error";
$el = sprintf(esc_html__("%1$s: Comments: Tried to run comment_upsert, and ended up without a comment id", "object-sync-for-salesforce"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function comment_update($cz, $rH, $wM = "comment_ID")
{
$tv = array();
$tv[$wM] = $cz;
foreach ($rH as $Ac => $mT) {
if (!("wp_update_comment" === $mT["method_modify"])) {
goto MJ;
}
$tv[$Ac] = $mT["value"];
unset($rH[$Ac]);
MJ:
Ls:
}
zQ:
$B8 = wp_update_comment($tv);
if (0 === $B8) {
goto gX;
}
$Hn = $this->update_wp_meta($rH, $cz, "comment");
$v1 = $Hn["success"];
$errors = $Hn["errors"];
do_action($this->option_prefix . "set_more_comment_data", $cz, $rH, "update");
goto aN;
gX:
$v1 = false;
$errors = $B8;
aN:
if (is_wp_error($B8)) {
goto uD;
}
$v1 = true;
$errors = array();
goto Wj;
uD:
$v1 = false;
$errors = $B8;
Wj:
$FH = array("data" => array($wM => $cz, "success" => $v1), "errors" => $errors);
return $FH;
}
public function object_update($J5, $vv, $rH, $U2 = array())
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["id_field"];
switch ($J5) {
case "user":
$FH = $this->user_update($vv, $rH, $wM);
goto T9;
case "post":
$FH = $this->post_update($vv, $rH, $wM);
goto T9;
case "attachment":
$FH = $this->attachment_update($vv, $rH, $wM);
goto T9;
case "category":
case "tag":
case "post_tag":
$FH = $this->term_update($vv, $rH, $J5, $wM);
goto T9;
case "comment":
$FH = $this->comment_update($vv, $rH, $wM);
goto T9;
default:
if (!has_filter($this->option_prefix . "update_custom_wordpress_item")) {
goto x2;
}
$FH = apply_filters($this->option_prefix . "update_custom_wordpress_item", array("id" => $vv, "params" => $rH, "name" => $J5, "id_field" => $wM));
goto VM;
x2:
$FH = $this->post_update($vv, $rH, $wM, $J5);
VM:
goto T9;
}
Eb:
T9:
if (!(isset($FH["errors"]) && !empty($FH["errors"]))) {
goto os;
}
$CG = "error";
if (!isset($U2["salesforce_id"])) {
goto Ll;
}
$el = sprintf(esc_html__("%1$s: WordPress update for %2$s ID %3$s from Salesforce record %4$s was unsuccessful with these errors:", "object-sync-for-salesforce"), ucfirst(esc_attr($CG)), esc_attr($J5), esc_attr($vv), esc_attr($U2["salesforce_id"]));
goto PP;
Ll:
$el = sprintf(esc_html__("%1$s: WordPress update for %2$s ID %3$s was unsuccessful with these errors:", "object-sync-for-salesforce"), ucfirst(esc_attr($CG)), esc_attr($J5), esc_attr($vv));
PP:
os:
return $FH;
}
public function object_delete($J5, $vv)
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["id_field"];
switch ($J5) {
case "user":
$v1 = $this->user_delete($vv);
goto ed;
case "post":
$v1 = $this->post_delete($vv);
goto ed;
case "attachment":
$v1 = $this->attachment_delete($vv);
goto ed;
case "category":
case "tag":
case "post_tag":
$v1 = $this->term_delete($vv, $J5);
goto ed;
case "comment":
$v1 = $this->comment_delete($vv);
goto ed;
default:
if (!has_filter($this->option_prefix . "delete_custom_wordpress_item")) {
goto iI;
}
$v1 = apply_filters($this->option_prefix . "delete_custom_wordpress_item", array("id" => $vv, "name" => $J5));
goto Im;
iI:
$v1 = $this->post_delete($vv);
Im:
$v1 = $this->post_delete($vv);
goto ed;
}
vX:
ed:
$FH = array("data" => array("success" => $v1), "errors" => array());
return $FH;
}
private function user_delete($vv, $R9 = null)
{
require_once ABSPATH . "wp-admin/includes/user.php";
$FH = wp_delete_user($vv, $R9);
return $FH;
}
private function post_delete($vv, $qP = false)
{
$FH = wp_delete_post($vv, $qP);
return $FH;
}
private function attachment_delete($vv, $qP = false)
{
$FH = wp_delete_attachment($vv, $qP);
return $FH;
}
private function term_delete($Hv, $zo)
{
if (!("tag" === $zo)) {
goto JQ;
}
$zo = "post_tag";
JQ:
$FH = wp_delete_term($Hv, $zo);
return $FH;
}
private function comment_delete($vv, $qP = false)
{
$FH = wp_delete_comment($vv, $qP);
return $FH;
}
private function append_tec_event_dates($UZ, $mL, $tv)
{
if (!(("start" === $mL || "end" === $mL) && class_exists("Tribe__Date_Utils"))) {
goto dK;
}
$f1 = array();
$JF = ucfirst($mL);
$ZB = strtotime($UZ);
$f1["Event" . $JF . "Date"] = $ZB;
$f1["Event" . $JF . "Hour"] = gmdate(Tribe__Date_Utils::HOURFORMAT, $ZB);
$f1["Event" . $JF . "Minute"] = gmdate(Tribe__Date_Utils::MINUTEFORMAT, $ZB);
$f1["Event" . $JF . "Meridian"] = gmdate(Tribe__Date_Utils::MERIDIANFORMAT, $ZB);
$tv = $tv + $f1;
dK:
return $tv;
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace MoSfSyncSalesforce\Handler;
defined("\x41\102\x53\120\101\x54\110") || exit;
use MoSfSyncSalesforce\Helper\PluginConstants;
use MoSfSyncSalesforce\Handler\Object_Sync_Sf_WordPress_Transient;
use MoSfSyncSalesforce\Helper\view\PaidMemberShipProIntegration;
include plugin_dir_path(__DIR__) . "\x48\x65\x6c\160\145\162\x2f\x76\151\145\x77\x2f\120\x61\151\x64\115\x65\155\142\145\x72\123\150\151\160\x50\x72\x6f\x49\x6e\x74\145\147\x72\x61\x74\x69\x6f\156\56\x70\x68\160";
class Object_Sync_Sf_WordPress
{
public $version;
public $file;
public $wpdb;
public $slug;
public $option_prefix;
public $logging;
public $mappings;
public $wordpress_objects;
public $options;
public $sfwp_transients;
public $debug;
public function __construct()
{
global $wpdb;
$this->version = PluginConstants::VERSION;
$this->file = MOSF_DIRC;
$this->wpdb = $wpdb;
$this->option_prefix = PluginConstants::OPTION_PREFIX;
add_action("\x61\x64\x6d\151\156\137\x69\156\x69\164", function () {
$this->wordpress_objects = $this->get_object_types();
});
$this->options = array("\143\141\143\x68\145" => false, "\x63\141\x63\150\x65\x5f\145\x78\x70\151\x72\141\164\151\x6f\156" => $this->cache_expiration("\167\x6f\162\144\x70\x72\x65\x73\x73\137\x64\141\x74\141\137\x63\x61\143\x68\x65", 86400), "\164\171\160\145" => "\x72\x65\141\x64");
$this->sfwp_transients = new Object_Sync_Sf_WordPress_Transient("\x6d\157\x5f\163\146\167\160\137\164\x72\x61\x6e\163\x69\145\156\x74\163");
}
public function get_object_types()
{
$ce = array("\x75\x73\145\162", "\x63\157\x6d\x6d\145\156\164", "\x63\x61\164\145\x67\x6f\x72\x79", "\x74\x61\147");
$wP = array_merge(get_post_types(), $ce);
$wP = apply_filters($this->option_prefix . "\x61\x64\x64\137\155\x6f\162\x65\137\x77\157\x72\x64\160\162\145\x73\163\x5f\164\171\x70\x65\163", $wP);
$wi = apply_filters($this->option_prefix . "\x72\x65\x6d\157\166\x65\x5f\x77\157\x72\x64\160\x72\145\163\163\x5f\x74\171\160\145\x73", array("\167\x70\137\x6c\157\147", "\163\x63\x68\x65\x64\x75\x6c\145\x64\x2d\x61\x63\164\x69\x6f\x6e", "\162\145\x76\151\x73\151\157\156"));
if (empty($wi)) {
goto UC;
}
$wP = array_diff($wP, $wi);
UC:
sort($wP);
return $wP;
}
public function cache_expiration($Kr, $ED)
{
$GO = get_site_option($Kr, $ED);
return $GO;
}
public function get_wordpress_object_data($Wf, $aC, $Kk = false)
{
$Ky = array();
$VF = $this->get_wordpress_table_structure($Wf);
$Fn = $VF["\x6d\x65\x74\141\x5f\x74\141\142\154\x65"];
$Iy = maybe_unserialize($VF["\155\x65\x74\141\137\155\x65\x74\x68\157\x64\163"]);
$sC = $VF["\x63\157\156\164\x65\x6e\x74\137\x74\x61\142\154\x65"];
$CR = maybe_unserialize($VF["\143\x6f\x6e\164\145\156\x74\137\155\x65\164\150\157\144\x73"]);
$wM = $VF["\x69\144\137\146\x69\x65\x6c\x64"];
$Pt = $VF["\157\142\x6a\x65\x63\164\137\156\141\155\145"];
$kl = $VF["\167\x68\145\162\145"];
$cX = $VF["\151\147\x6e\157\162\145\x5f\153\145\x79\x73"];
if (!(true === $Kk)) {
goto VX;
}
$Ky = array();
$Ky[$wM] = $aC;
return $Ky;
VX:
if ("\165\163\x65\162" === $Wf) {
goto Vp;
}
if ("\160\x6f\163\164" === $Wf || "\141\164\164\141\x63\x68\155\x65\156\164" === $Wf) {
goto RR;
}
if ("\143\141\164\x65\x67\x6f\162\171" === $Wf || "\x74\141\147" === $Wf || "\160\157\x73\164\137\164\x61\x67" === $Wf) {
goto bp;
}
if ("\x63\157\x6d\155\145\156\x74" === $Wf) {
goto xa;
}
$Hs = get_post($aC);
goto A2;
Vp:
$Hs = get_userdata($aC);
goto A2;
RR:
$Hs = get_post($aC);
goto A2;
bp:
$Hs = get_term($aC);
goto A2;
xa:
$Hs = get_comment($aC);
A2:
if (is_object($Hs)) {
goto HE;
}
return $Ky;
HE:
$uW = $this->get_wordpress_object_fields($Wf);
foreach ($uW as $Ac => $mT) {
$nr = $mT["\x6b\145\171"];
$Ky[$nr] = $Hs->{$nr};
dQ:
}
z_:
$Ky = apply_filters($this->option_prefix . "\167\157\x72\x64\160\162\145\163\x73\x5f\x6f\142\x6a\145\143\164\x5f\x64\x61\x74\141", $Ky, $Wf);
return $Ky;
}
public function get_wordpress_table_structure($Wf)
{
if ("\x61\x74\164\x61\143\150\x6d\x65\x6e\164" === $Wf) {
goto BB;
}
if ("\x70\155\160\x72\157\x5f\157\x72\x64\x65\x72\163" === $Wf) {
goto M3;
}
if ("\165\x73\x65\x72" === $Wf) {
goto Q6;
}
if ("\x70\157\163\x74" === $Wf) {
goto qX;
}
if ("\x63\141\x74\145\147\x6f\162\171" === $Wf || "\x74\x61\x67" === $Wf || "\160\157\x73\164\x5f\164\x61\x67" === $Wf) {
goto cW;
}
if ("\143\157\x6d\155\x65\156\x74" === $Wf) {
goto Yy;
}
$VF = array("\x6f\142\x6a\145\143\164\x5f\x6e\141\155\x65" => "\x70\157\x73\164", "\x63\x6f\x6e\164\145\x6e\x74\x5f\155\145\164\x68\157\144\x73" => array("\x63\162\145\x61\x74\x65" => "\x77\160\x5f\151\x6e\x73\x65\162\x74\x5f\160\157\163\164", "\162\x65\141\144" => "\147\145\164\137\160\157\x73\x74\x73", "\x75\160\144\x61\x74\145" => "\x77\160\137\165\x70\144\141\x74\145\x5f\160\157\163\164", "\144\x65\154\145\x74\x65" => "\167\x70\x5f\144\145\154\145\x74\x65\137\x70\x6f\163\164", "\155\x61\x74\143\x68" => "\x67\x65\x74\x5f\x70\157\x73\164\163"), "\155\145\x74\x61\x5f\155\145\164\x68\x6f\x64\x73" => array("\x63\162\x65\141\164\145" => "\141\144\x64\137\x70\x6f\x73\164\137\155\145\164\141", "\162\145\x61\x64" => "\147\145\164\137\x70\x6f\x73\164\137\x6d\145\x74\141", "\x75\160\144\141\164\145" => "\165\160\144\141\164\x65\x5f\x70\157\x73\164\x5f\x6d\x65\x74\141", "\x64\x65\154\145\164\x65" => "\x64\145\x6c\145\164\145\137\x70\x6f\x73\x74\137\x6d\145\x74\x61", "\155\x61\x74\x63\150" => "\x57\x50\137\121\x75\x65\x72\171"), "\143\157\156\x74\145\156\x74\x5f\x74\141\x62\154\145" => $this->wpdb->prefix . "\160\157\163\x74\x73", "\151\x64\137\x66\151\x65\154\144" => "\x49\x44", "\x6d\x65\164\x61\x5f\x74\x61\142\x6c\145" => $this->wpdb->prefix . "\x70\x6f\x73\x74\155\x65\164\x61", "\155\x65\164\141\137\152\157\151\156\x5f\x66\151\145\x6c\x64" => "\x70\157\163\x74\x5f\x69\144", "\167\x68\145\x72\x65" => "\101\x4e\x44\x20" . $this->wpdb->prefix . "\160\x6f\163\x74\x73\56\x70\x6f\x73\x74\x5f\164\x79\160\x65\40\x3d\40\42" . $Wf . "\x22", "\x69\147\x6e\x6f\x72\x65\137\153\x65\171\163" => array());
goto K6;
BB:
$VF = array("\x6f\142\152\145\143\x74\137\156\x61\x6d\x65" => "\x70\x6f\163\164", "\143\157\x6e\164\145\156\x74\137\x6d\145\x74\150\x6f\144\163" => array("\x63\x72\x65\141\164\x65" => "\x77\x70\x5f\151\156\x73\145\x72\164\x5f\141\x74\164\x61\x63\x68\155\x65\x6e\164", "\x72\x65\x61\x64" => "\x67\x65\x74\x5f\x70\157\x73\x74\x73", "\165\x70\144\x61\164\145" => "\x77\160\x5f\151\156\x73\x65\162\x74\137\x61\164\164\x61\143\x68\x6d\145\156\164", "\144\x65\154\x65\164\145" => "\167\x70\137\x64\145\154\x65\164\x65\x5f\141\164\x74\141\x63\x68\x6d\x65\x6e\x74", "\155\x61\164\x63\150" => "\x67\x65\x74\137\160\157\163\164\163"), "\x6d\145\164\141\137\155\x65\x74\x68\x6f\x64\163" => array("\143\x72\x65\x61\x74\x65" => "\167\x70\137\x67\145\x6e\x65\162\141\164\145\137\x61\164\164\141\x63\150\x6d\x65\156\164\137\155\x65\x74\x61\x64\141\164\x61", "\162\145\x61\144" => "\x77\x70\137\x67\145\x74\137\x61\164\164\x61\x63\x68\155\145\156\164\137\155\145\x74\141\x64\x61\x74\141", "\165\160\144\141\164\145" => "\167\160\x5f\x75\160\144\x61\164\145\x5f\141\164\x74\x61\143\150\x6d\x65\x6e\x74\x5f\x6d\x65\x74\141\x64\141\164\141", "\144\145\154\x65\164\x65" => '', "\x6d\x61\164\143\x68" => "\x57\120\137\x51\x75\x65\x72\171"), "\x63\x6f\x6e\x74\x65\x6e\164\137\x74\x61\x62\154\145" => $this->wpdb->prefix . "\160\x6f\x73\x74\x73", "\151\x64\137\x66\151\x65\154\x64" => "\111\x44", "\x6d\145\164\x61\x5f\x74\x61\x62\154\145" => $this->wpdb->prefix . "\x70\x6f\x73\164\x6d\x65\164\141", "\155\x65\x74\141\x5f\152\157\x69\x6e\x5f\146\151\145\x6c\x64" => "\x70\157\x73\164\137\151\144", "\167\x68\145\x72\145" => "\x41\x4e\104\x20" . $this->wpdb->prefix . "\160\157\163\164\x73\56\x70\157\x73\164\x5f\x74\x79\160\145\40\75\40\x22" . $Wf . "\x22", "\x69\x67\x6e\x6f\x72\145\137\x6b\145\171\x73" => array());
goto K6;
M3:
$VF = array("\157\x62\152\145\x63\x74\137\156\x61\155\145" => "\x70\155\x70\162\x6f\137\155\x65\x6d\142\x65\162\163\x68\151\x70\x5f\157\162\144\145\x72", "\x63\157\156\x74\145\x6e\164\137\155\145\164\x68\157\x64\x73" => array("\x63\x72\145\141\164\145" => "\x6d\157\x5f\163\x66\x5f\163\171\x6e\143\137\x63\162\145\141\x74\x65\137\x6f\162\x64\x65\x72", "\162\x65\141\144" => "\x6d\x6f\x5f\x73\146\137\x73\x79\156\143\137\147\145\164\x4d\145\155\x62\x65\x72\117\x72\x64\145\162\x42\171\x43\x6f\144\x65", "\x75\160\144\x61\164\x65" => "\155\157\137\x73\146\137\x73\x79\x6e\143\x5f\165\x70\144\141\164\x65\137\x6f\x72\x64\x65\x72", "\x64\145\154\145\164\x65" => '', "\x6d\141\x74\x63\150" => ''), "\x6d\x65\164\141\137\x6d\145\164\x68\157\144\x73" => array("\143\162\x65\x61\x74\145" => '', "\162\x65\x61\x64" => "\147\145\164\x5f\160\155\x70\x72\x6f\137\155\x65\155\x62\x65\x72\163\x68\151\160\137\157\x72\144\x65\x72\x5f\155\145\x74\x61", "\x75\x70\144\141\164\145" => "\165\x70\x64\141\164\145\137\x70\155\160\162\157\x5f\155\x65\x6d\x62\x65\162\x73\x68\x69\160\x5f\x6f\x72\144\145\x72\x5f\x6d\x65\x74\x61", "\x64\x65\x6c\145\x74\145" => "\144\x65\154\x65\164\x65\137\160\155\160\162\x6f\x5f\x6d\x65\x6d\142\145\162\x73\x68\151\160\x5f\x6f\x72\144\145\x72\137\x6d\x65\164\141", "\x6d\141\164\x63\x68" => ''), "\x63\x6f\x6e\x74\x65\156\164\x5f\164\141\x62\x6c\145" => "\x77\x70\x5f\160\x6d\x70\x72\157\137\x6d\x65\155\142\145\x72\x73\x68\151\x70\137\157\x72\144\145\x72\x73", "\151\x64\137\146\151\x65\x6c\144" => "\151\x64", "\x6d\145\164\141\137\164\141\x62\154\x65" => "\167\x70\137\160\155\x70\162\157\x5f\155\145\x6d\x62\x65\x72\163\150\151\x70\x5f\157\x72\x64\145\x72\155\x65\164\141", "\x6d\145\x74\141\x5f\x6a\x6f\x69\156\x5f\146\x69\x65\154\144" => "\x70\155\160\162\157\137\x6d\x65\x6d\142\x65\162\x73\x68\151\x70\137\x6f\x72\x64\x65\162\x5f\151\x64", "\167\x68\x65\x72\145" => '', "\151\x67\x6e\x6f\x72\145\137\153\145\x79\x73" => array());
goto K6;
Q6:
$HI = array("\143\162\x65\x61\164\x65" => "\165\160\144\x61\x74\x65\137\165\163\x65\162\x5f\x6d\145\x74\141", "\x72\145\141\144" => "\147\145\164\x5f\165\x73\145\162\x5f\155\x65\x74\141", "\x75\160\x64\141\x74\x65" => "\165\160\x64\x61\x74\145\137\165\163\x65\162\137\x6d\145\x74\x61", "\x64\145\154\x65\x74\145" => "\x64\x65\154\x65\x74\x65\137\x75\163\x65\x72\137\x6d\x65\164\x61");
$VF = array("\157\142\152\145\x63\x74\137\x6e\x61\x6d\145" => "\165\x73\145\162", "\143\157\156\x74\x65\x6e\x74\137\155\145\164\150\x6f\x64\x73" => array("\143\162\145\x61\x74\145" => "\167\160\x5f\x69\x6e\x73\x65\162\x74\137\165\163\x65\162", "\x72\x65\x61\x64" => "\147\145\x74\137\x75\163\x65\162\x5f\142\x79", "\165\x70\144\x61\x74\145" => "\x77\x70\137\x75\160\144\x61\164\x65\137\165\163\x65\x72", "\x64\x65\x6c\145\x74\145" => "\167\160\137\144\145\154\145\164\145\137\165\x73\x65\162", "\x6d\141\164\x63\x68" => "\147\145\x74\137\x75\x73\145\162\137\142\x79"), "\155\x65\164\x61\137\x6d\145\164\150\x6f\144\x73" => $HI, "\143\x6f\156\164\145\x6e\164\x5f\x74\141\x62\154\145" => "\167\160\x5f\165\163\145\x72\163", "\x69\144\x5f\x66\151\145\x6c\x64" => "\x49\104", "\x6d\x65\164\141\x5f\x74\x61\142\x6c\x65" => "\167\160\137\165\x73\145\x72\155\145\x74\141", "\155\145\x74\141\x5f\152\x6f\x69\156\x5f\146\151\145\154\144" => "\x75\x73\x65\x72\x5f\x69\144", "\x77\150\145\162\x65" => '', "\x69\x67\156\157\x72\145\137\153\x65\171\163" => array("\165\163\x65\x72\137\x70\141\163\x73", "\165\163\145\162\x5f\x61\143\x74\x69\x76\141\x74\151\157\x6e\137\153\x65\x79", "\x73\x65\x73\163\x69\x6f\x6e\x5f\164\157\x6b\145\156\163"));
goto K6;
qX:
$VF = array("\x6f\x62\152\145\143\x74\137\x6e\141\155\145" => "\x70\157\163\164", "\x63\157\x6e\164\x65\x6e\164\x5f\x6d\x65\x74\150\157\144\x73" => array("\143\162\x65\x61\164\145" => "\x77\160\x5f\x69\x6e\x73\145\162\164\137\x70\157\x73\164", "\x72\x65\x61\x64" => "\147\145\164\137\160\x6f\163\x74\x73", "\x75\x70\144\x61\x74\145" => "\167\x70\x5f\x75\160\144\141\164\145\137\160\x6f\x73\164", "\144\145\x6c\x65\x74\145" => "\x77\x70\137\x64\145\x6c\x65\x74\145\137\160\x6f\x73\x74", "\x6d\x61\x74\143\x68" => "\147\x65\x74\137\x70\x6f\x73\164\163"), "\x6d\145\164\141\137\x6d\145\x74\150\157\x64\x73" => array("\x63\162\x65\x61\x74\145" => "\x61\x64\x64\x5f\x70\157\x73\164\x5f\155\x65\x74\x61", "\162\x65\x61\144" => "\147\145\x74\137\160\x6f\x73\164\x5f\155\145\164\x61", "\165\x70\x64\141\164\x65" => "\x75\x70\144\141\164\145\137\x70\157\163\x74\x5f\155\x65\x74\141", "\x64\145\x6c\145\x74\x65" => "\144\x65\x6c\x65\x74\145\x5f\x70\x6f\163\x74\x5f\x6d\145\x74\141", "\155\x61\x74\143\x68" => "\127\120\x5f\x51\165\x65\162\x79"), "\x63\x6f\156\x74\x65\156\164\x5f\164\x61\x62\x6c\145" => $this->wpdb->prefix . "\x70\157\x73\x74\163", "\x69\144\x5f\x66\151\x65\154\144" => "\111\104", "\155\x65\164\x61\137\x74\x61\142\154\x65" => $this->wpdb->prefix . "\160\157\163\164\x6d\x65\x74\141", "\155\145\164\141\x5f\152\x6f\x69\156\x5f\146\151\x65\x6c\144" => "\x70\157\163\x74\x5f\x69\144", "\167\150\145\x72\145" => "\x41\116\x44\40" . $this->wpdb->prefix . "\x70\157\163\164\163\56\160\x6f\x73\x74\137\x74\x79\160\145\x20\75\40\42" . $Wf . "\42", "\x69\x67\156\157\162\145\x5f\x6b\145\x79\163" => array());
goto K6;
cW:
$VF = array("\157\x62\152\145\143\x74\137\156\x61\155\145" => "\164\145\x72\155", "\x63\157\x6e\164\x65\x6e\x74\x5f\x6d\145\x74\x68\157\144\163" => array("\x63\x72\145\x61\x74\145" => "\167\x70\x5f\151\156\x73\x65\162\164\x5f\x74\145\x72\x6d", "\x72\145\x61\x64" => "\147\145\164\x5f\x74\x65\x72\155\137\142\171", "\x75\x70\x64\141\164\x65" => "\x77\160\x5f\x75\x70\144\141\164\x65\x5f\x74\x65\162\x6d", "\144\145\x6c\x65\164\145" => "\x77\160\137\x64\x65\154\x65\x74\x65\x5f\164\x65\162\155", "\155\141\x74\143\150" => "\x67\x65\x74\x5f\164\145\162\155\137\142\x79"), "\155\145\164\x61\137\155\145\164\x68\157\144\163" => array("\x63\162\145\141\x74\145" => "\141\x64\x64\137\164\x65\162\x6d\x5f\155\x65\164\x61", "\x72\145\141\144" => "\147\145\x74\137\164\x65\162\155\137\x6d\145\x74\141", "\165\x70\x64\141\x74\145" => "\x75\x70\144\x61\x74\145\x5f\x74\x65\x72\x6d\137\155\x65\164\141", "\144\x65\x6c\x65\x74\145" => "\x64\145\x6c\x65\x74\145\x5f\155\x65\x74\141\x64\141\x74\x61", "\x6d\141\164\x63\x68" => "\127\x50\137\124\x65\x72\155\x5f\121\165\x65\162\x79"), "\143\157\156\x74\145\x6e\x74\x5f\164\x61\x62\154\x65" => $this->wpdb->prefix . "\164\x65\x72\155\x73", "\x69\144\x5f\x66\151\145\x6c\144" => "\164\x65\162\155\x5f\151\x64", "\155\x65\x74\141\137\164\141\142\154\x65" => array($this->wpdb->prefix . "\x74\x65\162\155\155\145\164\141", $this->wpdb->prefix . "\x74\145\x72\155\137\x74\141\x78\x6f\x6e\157\x6d\171"), "\155\145\164\141\x5f\152\157\151\x6e\x5f\x66\x69\145\x6c\144" => "\x74\145\162\x6d\x5f\151\144", "\x77\150\x65\x72\145" => '', "\151\147\x6e\x6f\162\145\137\x6b\145\x79\x73" => array());
goto K6;
Yy:
$VF = array("\157\142\x6a\x65\x63\x74\x5f\x6e\x61\155\145" => "\143\157\x6d\155\x65\156\x74", "\x63\x6f\x6e\x74\x65\156\164\137\155\x65\x74\150\x6f\144\163" => array("\x63\x72\x65\x61\164\145" => "\167\160\137\x6e\145\x77\x5f\143\157\x6d\155\145\x6e\x74", "\x72\145\141\144" => "\x67\145\x74\137\x63\157\155\155\145\x6e\x74\x73", "\165\x70\x64\x61\x74\145" => "\x77\160\137\x75\x70\144\x61\x74\145\137\x63\157\x6d\155\x65\156\x74", "\x64\145\x6c\x65\164\145" => "\x77\160\137\x64\x65\x6c\x65\x74\x65\x5f\143\x6f\x6d\x6d\145\156\x74", "\155\x61\x74\143\150" => "\x67\145\x74\137\143\157\155\x6d\145\x6e\164\163"), "\155\x65\164\141\x5f\x6d\145\164\150\157\144\163" => array("\143\162\145\141\164\145" => "\x61\x64\x64\137\x63\157\155\155\x65\156\164\x5f\x6d\145\x74\141", "\x72\145\141\x64" => "\147\x65\164\x5f\143\x6f\155\x6d\x65\156\x74\x5f\155\145\x74\x61", "\165\x70\144\141\164\145" => "\165\x70\144\x61\x74\x65\x5f\143\157\x6d\155\145\x6e\x74\137\155\145\164\x61", "\x64\x65\x6c\145\164\145" => "\144\x65\154\145\164\x65\137\x63\x6f\155\x6d\x65\x6e\x74\137\155\145\x74\x61\144\x61\164\x61", "\x6d\x61\164\143\150" => "\x57\120\137\x43\x6f\x6d\155\x65\156\164\x5f\x51\165\145\x72\x79"), "\143\157\x6e\164\x65\x6e\x74\137\x74\141\142\x6c\x65" => $this->wpdb->prefix . "\x63\x6f\155\x6d\145\156\x74\x73", "\x69\144\137\x66\151\145\154\x64" => "\143\x6f\155\155\145\156\164\x5f\111\104", "\x6d\x65\164\141\137\164\x61\142\x6c\x65" => $this->wpdb->prefix . "\x63\x6f\x6d\155\145\x6e\x74\155\x65\164\141", "\x6d\x65\164\141\x5f\x6a\x6f\151\x6e\137\x66\x69\145\154\144" => "\143\x6f\x6d\x6d\x65\x6e\x74\x5f\151\144", "\x77\150\x65\x72\145" => '', "\x69\x67\x6e\x6f\162\x65\x5f\153\145\171\x73" => array());
K6:
return $VF;
}
public function get_wordpress_object_fields($Ky, $wM = "\111\x44")
{
$VF = $this->get_wordpress_table_structure($Ky);
$Fn = $VF["\155\145\164\141\x5f\164\141\142\154\x65"];
$Iy = maybe_unserialize($VF["\155\145\x74\x61\137\x6d\x65\164\x68\x6f\144\x73"]);
$sC = $VF["\143\157\x6e\x74\x65\x6e\x74\x5f\x74\141\142\x6c\145"];
$CR = maybe_unserialize($VF["\143\x6f\156\164\145\x6e\x74\x5f\x6d\145\x74\150\x6f\x64\x73"]);
$wM = $VF["\151\x64\137\x66\x69\x65\x6c\x64"];
$Pt = $VF["\x6f\x62\x6a\145\x63\164\137\x6e\x61\x6d\145"];
$kl = $VF["\x77\x68\145\x72\x65"];
$cX = $VF["\x69\x67\x6e\157\x72\x65\x5f\x6b\x65\171\x73"];
$ys = array();
if (true === $this->options["\143\x61\x63\x68\x65"] && "\167\x72\x69\x74\145" !== $this->options["\x63\x61\x63\150\145"]) {
goto WY;
}
$ys["\144\x61\x74\141"] = $this->object_fields($Pt, $wM, $sC, $CR, $Fn, $Iy, $kl, $cX);
$ys["\146\162\x6f\155\137\143\141\143\150\x65"] = false;
$ys["\x63\x61\x63\150\x65\144"] = false;
goto ea;
WY:
$pw = $this->cache_get($Ky, array("\x64\x61\x74\x61", "\x6d\x65\x74\141"));
if (is_array($pw)) {
goto FW;
}
$ys["\x64\141\164\141"] = $this->object_fields($Pt, $wM, $sC, $CR, $Fn, $Iy, $kl, $cX);
if (!empty($ys["\144\141\164\x61"])) {
goto mq;
}
$ys["\143\141\x63\150\x65\x64"] = false;
goto xh;
mq:
$ys["\x63\141\x63\150\x65\144"] = $this->cache_set($Ky, array("\144\x61\164\141", "\155\x65\164\141"), $ys["\x64\141\x74\x61"], $this->options["\x63\x61\x63\x68\x65\x5f\145\x78\x70\151\x72\141\x74\151\x6f\x6e"]);
xh:
$ys["\x66\x72\x6f\155\x5f\x63\x61\143\x68\x65"] = false;
goto T2;
FW:
$ys["\144\x61\x74\141"] = $pw;
$ys["\146\162\157\155\x5f\x63\x61\x63\150\145"] = true;
$ys["\143\141\x63\150\x65\x64"] = true;
T2:
ea:
$ys = apply_filters($this->option_prefix . "\167\157\162\144\x70\162\145\163\x73\x5f\x6f\142\152\x65\x63\164\x5f\x66\x69\x65\x6c\144\x73", $ys, $Ky);
error_log("\x6f\142\152\145\x63\x74\x20\146\x69\145\154\x64\163\40\75\76\40" . print_r($ys["\144\x61\x74\x61"], true));
return $ys["\x64\141\x74\141"];
}
public function cache_get($pL, $u1)
{
if (is_array($u1)) {
goto cE;
}
$u1 .= $pL;
goto Jg;
cE:
$u1[] = $pL;
array_multisort($u1);
Jg:
$ON = md5(wp_json_encode($u1));
return $this->sfwp_transients->get($ON);
}
private function object_fields($Pt, $wM, $sC, $CR, $Fn, $Iy, $kl, $cX)
{
$Zg = $this->wpdb->get_col("\x44\105\123\x43\x20{$sC}", 0);
$YD = $this->wpdb->get_col("\x44\x45\123\x43\x20{$sC}", 1);
if (!is_array($Fn)) {
goto zt;
}
$WY = $Fn[1];
$Fn = $Fn[0];
zt:
$tO = "\xd\12\x9\x9\123\105\114\105\x43\x54\40\x44\x49\123\x54\111\x4e\x43\124\40" . $Fn . "\56\155\x65\164\141\x5f\x6b\145\x79\xd\12\11\11\106\x52\x4f\115\x20" . $sC . "\xd\12\11\11\114\x45\106\124\x20\112\x4f\x49\x4e\40" . $Fn . "\xd\xa\11\11\x4f\116\x20" . $sC . "\x2e" . $wM . "\x20\75\x20" . $Fn . "\x2e" . $Pt . "\x5f\151\144\xd\xa\11\11\127\x48\x45\x52\x45\40" . $Fn . "\56\x6d\145\x74\141\137\153\x65\x79\40\41\75\40\42\42\15\xa\11\x9" . $kl . "\xd\12\x9\x9";
$pA = $this->wpdb->get_results($tO);
$YT = array();
foreach ($Zg as $Ac => $mT) {
if (in_array($mT, $cX, true)) {
goto Nj;
}
$vQ = true;
if (!($mT === $wM)) {
goto gJ;
}
$vQ = false;
gJ:
$vQ = apply_filters($this->option_prefix . "\x77\157\x72\144\160\x72\145\163\x73\137\146\151\145\x6c\x64\137\x69\x73\137\145\x64\151\x74\x61\x62\x6c\145", $vQ, $mT);
$YT[] = array("\153\145\171" => $mT, "\x74\141\142\154\145" => $sC, "\155\x65\x74\x68\x6f\x64\163" => serialize($CR), "\164\171\x70\x65" => $YD[$Ac], "\145\144\x69\164\x61\142\154\145" => $vQ);
Nj:
PQ:
}
LQ:
foreach ($pA as $Ac => $mT) {
if (in_array($mT->meta_key, $cX, true)) {
goto QD;
}
$vQ = true;
if (!($mT === $wM)) {
goto M4;
}
$vQ = false;
M4:
$vQ = apply_filters($this->option_prefix . "\x77\157\x72\144\x70\x72\145\x73\x73\137\x66\x69\x65\x6c\x64\x5f\x69\163\137\x65\x64\x69\x74\x61\x62\154\145", $vQ, $mT->meta_key);
$YT[] = array("\x6b\145\x79" => $mT->meta_key, "\x74\141\x62\154\x65" => $Fn, "\x6d\x65\164\x68\x6f\144\x73" => serialize($Iy), "\x65\x64\151\164\x61\x62\154\145" => $vQ);
QD:
iV:
}
zf:
if (!("\x74\x65\x72\x6d" === $Pt)) {
goto iz;
}
$zo = $this->wpdb->get_col("\104\x45\x53\103\40{$WY}", 0);
foreach ($zo as $Ac => $mT) {
$rb = array_search($mT, array_column($YT, "\153\x65\171"), true);
if (!(0 !== $rb)) {
goto Ce;
}
$vQ = true;
if (!($mT === $wM)) {
goto mZ;
}
$vQ = false;
mZ:
$vQ = apply_filters($this->option_prefix . "\167\x6f\162\144\x70\x72\145\x73\x73\x5f\x66\x69\145\x6c\144\x5f\151\163\137\x65\x64\151\x74\141\x62\154\x65", $vQ, $mT);
$YT[] = array("\x6b\145\171" => $mT, "\164\x61\x62\154\145" => $WY, "\155\x65\164\150\157\144\x73" => serialize($CR), "\145\x64\151\164\141\142\x6c\145" => $vQ);
Ce:
Cw:
}
wL:
iz:
return $YT;
}
public function cache_set($pL, $u1, $Hs, $GO = '')
{
if (is_array($u1)) {
goto dN;
}
$u1 .= $pL;
goto Jf;
dN:
$u1[] = $pL;
array_multisort($u1);
Jf:
$ON = md5(wp_json_encode($u1));
if (!('' === $GO)) {
goto hE;
}
$GO = $this->options["\x63\141\x63\150\145\137\145\170\x70\151\162\x61\x74\x69\x6f\156"];
hE:
return $this->sfwp_transients->set($ON, $Hs, $GO);
}
public function object_create($J5, $rH)
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["\x69\x64\137\146\x69\145\x6c\x64"];
switch ($J5) {
case "\x75\x73\145\162":
$FH = $this->user_create($rH, $wM);
goto bN;
case "\160\157\x73\x74":
$FH = $this->post_create($rH, $wM);
goto bN;
case "\141\x74\164\x61\x63\150\155\145\x6e\164":
$FH = $this->attachment_create($rH, $wM);
goto bN;
case "\143\x61\164\145\147\x6f\162\171":
case "\164\141\x67":
case "\x70\x6f\x73\x74\137\x74\x61\147":
$FH = $this->term_create($rH, $J5, $wM);
goto bN;
case "\x63\157\x6d\x6d\145\156\164":
$FH = $this->comment_create($rH, $wM);
goto bN;
default:
if (!has_filter($this->option_prefix . "\x63\x72\x65\x61\x74\145\137\x63\165\163\x74\157\x6d\137\x77\x6f\x72\x64\160\162\x65\x73\163\x5f\151\x74\x65\x6d")) {
goto tX;
}
$FH = apply_filters($this->option_prefix . "\x63\162\145\x61\x74\x65\137\143\165\163\x74\157\x6d\137\x77\x6f\x72\144\160\162\145\x73\x73\x5f\151\164\x65\x6d", array("\x70\x61\162\x61\155\x73" => $rH, "\x6e\141\x6d\145" => $J5, "\151\144\x5f\x66\x69\x65\154\144" => $wM));
goto Fb;
tX:
$FH = $this->post_create($rH, $wM, $J5);
Fb:
goto bN;
}
GJ:
bN:
return $FH;
}
private function user_create($rH, $wM = "\111\x44")
{
$iH = $rH["\165\163\145\x72\137\x65\x6d\x61\x69\x6c"]["\x76\141\x6c\165\145"];
$Ut = $rH["\x75\163\x65\x72\137\x65\x6d\141\x69\x6c"]["\x76\x61\154\165\145"];
if (isset($rH["\x75\x73\145\x72\137\x6c\x6f\147\x69\156"]["\x76\x61\154\x75\x65"])) {
goto Mh;
}
$rH["\x75\163\x65\x72\x5f\x6c\x6f\x67\x69\x6e"] = array("\x76\x61\x6c\165\x65" => $iH, "\155\145\164\x68\157\x64\137\x6d\157\144\x69\146\x79" => "\167\160\x5f\151\156\x73\x65\162\164\x5f\165\163\145\x72", "\155\145\x74\x68\157\x64\x5f\162\x65\x61\144" => "\x67\145\164\137\x75\163\145\x72\137\142\x79");
goto KL;
Mh:
$iH = $rH["\x75\163\x65\162\x5f\154\x6f\x67\x69\156"]["\x76\141\x6c\165\145"];
KL:
if (false === username_exists($iH)) {
goto No;
}
$nc = username_exists($iH);
goto VN;
No:
$rH["\x75\163\x65\x72\x5f\160\x61\163\163"] = array("\x76\x61\x6c\165\145" => wp_generate_password(12, false), "\155\145\164\150\x6f\x64\137\x6d\157\x64\x69\x66\171" => "\167\x70\x5f\x69\x6e\x73\x65\x72\x74\137\x75\x73\145\x72", "\x6d\x65\x74\x68\x6f\x64\x5f\x72\145\x61\144" => "\x67\x65\164\x5f\165\x73\x65\162\x5f\x62\171");
$tv = array();
$J0 = $this->get_wordpress_table_structure("\165\x73\x65\162");
foreach ($rH as $Ac => $mT) {
if (!in_array($mT["\155\x65\164\x68\x6f\x64\x5f\x6d\157\x64\x69\146\171"], $J0["\143\157\156\x74\145\156\x74\x5f\x6d\145\164\x68\x6f\144\x73"], true)) {
goto fa;
}
$tv[$Ac] = $mT["\166\141\x6c\x75\145"];
unset($rH[$Ac]);
fa:
lF:
}
N6:
$nc = wp_insert_user($tv);
if (is_wp_error($nc)) {
goto WX;
}
$Hn = $this->create_wp_meta($rH, $nc, "\x75\x73\145\162");
$v1 = $Hn["\163\x75\143\x63\145\163\163"];
$errors = $Hn["\145\162\162\157\x72\x73"];
do_action($this->option_prefix . "\163\145\x74\x5f\155\157\x72\x65\x5f\x75\x73\145\162\137\x64\141\164\x61", $nc, $rH, "\x63\x72\145\x61\x74\x65");
wp_new_user_notification($nc, null, "\x62\x6f\x74\150");
goto ya;
WX:
$v1 = false;
$errors = $nc;
ya:
VN:
if (is_wp_error($nc)) {
goto kM;
}
$v1 = true;
$errors = array();
goto dp;
kM:
$v1 = false;
$errors = $nc;
dp:
$FH = array("\144\x61\x74\141" => array($wM => $nc, "\163\165\x63\x63\145\x73\163" => $v1), "\145\162\162\x6f\162\163" => $errors);
return $FH;
}
private function create_wp_meta($rH, $h3, $LB)
{
$v1 = true;
$errors = array();
if (!(!is_wp_error($h3) && is_array($rH) && !empty($rH))) {
goto rm;
}
foreach ($rH as $Ac => $mT) {
if (!('' === $mT["\x76\x61\154\x75\x65"])) {
goto x4;
}
goto wA;
x4:
$EA = $mT["\155\145\164\150\157\x64\x5f\155\x6f\144\x69\x66\x79"];
$Yj = $EA($h3, $Ac, $mT["\166\141\x6c\x75\145"]);
if (!(false === $Yj)) {
goto EP;
}
$v1 = false;
$errors[] = array("\x6d\x65\163\x73\x61\147\x65" => sprintf(esc_html__("\x54\162\151\145\x64\x20\x74\x6f\x20\x61\144\x64\x20\x25\x31\x24\x73\x20\155\145\x74\x61\40\x77\x69\x74\x68\x20\155\145\164\150\157\x64\40\x25\x32\44\163\x2e", "\157\142\152\145\x63\164\x2d\163\171\x6e\143\55\146\157\x72\x2d\163\x61\154\x65\163\146\157\162\x63\145"), esc_attr($LB), esc_html($EA)), "\x6b\145\x79" => $Ac, "\x76\x61\154\x75\x65" => $mT);
EP:
wA:
}
uV:
rm:
$Hn = array("\163\165\143\x63\145\163\163" => $v1, "\x65\x72\x72\x6f\x72\x73" => $errors);
return $Hn;
}
private function post_create($rH, $wM = "\x49\x44", $dR = "\x70\x6f\163\164")
{
$tv = array();
$J0 = $this->get_wordpress_table_structure($dR);
foreach ($rH as $Ac => $mT) {
if (!(is_array($mT) && in_array($mT["\155\x65\164\x68\x6f\x64\137\155\157\144\151\146\x79"], $J0["\143\x6f\156\x74\x65\x6e\x74\137\155\x65\x74\150\157\x64\x73"], true))) {
goto ef;
}
$tv[$Ac] = $mT["\166\x61\154\x75\145"];
unset($rH[$Ac]);
ef:
y4:
}
bz:
if (!('' !== $dR)) {
goto FI;
}
$tv["\160\x6f\163\164\x5f\x74\x79\160\x65"] = $dR;
FI:
if (isset($tv["\160\x6f\163\164\137\164\151\x74\154\x65"])) {
goto p3;
}
$tv["\160\157\x73\x74\137\x74\x69\x74\x6c\x65"] = "\40";
p3:
if (isset($tv["\160\157\x73\x74\x5f\143\x6f\x6e\x74\x65\156\164"])) {
goto tR;
}
$tv["\160\157\x73\x74\137\x63\157\x6e\x74\x65\156\164"] = "\x20";
tR:
$BM = wp_insert_post($tv, true);
if (is_wp_error($BM)) {
goto iX;
}
if (!isset($rH["\122\145\143\157\x72\x64\124\171\160\145\111\x64"]["\x76\141\154\x75\145"])) {
goto cC;
}
$rH["\x52\145\143\x6f\162\144\124\x79\x70\x65\x49\x64"]["\155\145\x74\x68\157\144\x5f\x6d\157\x64\151\146\171"] = "\165\x70\144\x61\x74\145\137\x70\x6f\x73\164\x5f\x6d\x65\x74\141";
$rH["\x52\x65\x63\157\x72\144\124\171\160\145\x49\x64"]["\155\x65\x74\150\157\x64\x5f\162\x65\x61\x64"] = "\147\145\x74\137\x70\157\x73\x74\137\x6d\145\x74\x61";
cC:
$Hn = $this->create_wp_meta($rH, $BM, "\x70\x6f\x73\164");
$v1 = $Hn["\163\165\x63\143\145\163\163"];
$errors = $Hn["\145\x72\x72\157\162\163"];
do_action($this->option_prefix . "\x73\145\164\x5f\x6d\157\162\x65\137\x70\x6f\163\x74\137\x64\x61\x74\x61", $BM, $rH, "\143\x72\x65\141\164\x65");
goto SE;
iX:
$v1 = false;
$errors = $BM;
SE:
if (is_wp_error($BM)) {
goto qe;
}
$v1 = true;
$errors = array();
goto y2;
qe:
$v1 = false;
$errors = $BM;
y2:
$FH = array("\144\141\164\141" => array($wM => $BM, "\x73\165\143\x63\145\x73\x73" => $v1), "\145\162\x72\157\162\x73" => $errors);
return $FH;
}
private function attachment_create($rH, $wM = "\111\x44")
{
$tv = array();
$J0 = $this->get_wordpress_table_structure("\141\x74\x74\141\x63\150\155\145\x6e\164");
foreach ($rH as $Ac => $mT) {
if (!in_array($mT["\x6d\x65\164\x68\x6f\144\x5f\155\157\144\x69\146\x79"], $J0["\x63\157\156\164\145\156\x74\137\x6d\145\164\150\157\x64\x73"], true)) {
goto Nf;
}
$tv[$Ac] = $mT["\x76\141\x6c\165\145"];
unset($rH[$Ac]);
Nf:
Nv:
}
zm:
$rH = apply_filters($this->option_prefix . "\163\x65\164\137\x69\x6e\151\164\x69\141\154\137\141\x74\x74\x61\143\150\155\x65\x6e\x74\137\144\x61\x74\x61", $rH);
if (isset($rH["\146\151\x6c\x65\156\141\x6d\x65"]["\166\x61\x6c\x75\145"])) {
goto FG;
}
$qF = false;
goto wk;
FG:
$qF = $rH["\146\x69\x6c\145\x6e\x61\155\x65"]["\x76\141\x6c\165\145"];
wk:
if (isset($rH["\160\141\162\145\x6e\x74"]["\x76\141\154\x75\x65"])) {
goto b_;
}
$GK = 0;
goto v2;
b_:
$GK = $rH["\x70\x61\162\x65\156\164"]["\166\x61\154\x75\x65"];
v2:
$kU = wp_insert_attachment($tv, $qF, $GK);
if (is_wp_error($kU)) {
goto Jv;
}
$v1 = true;
$errors = array();
if (!(false !== $qF)) {
goto rC;
}
require_once ABSPATH . "\167\160\x2d\x61\144\155\151\x6e\x2f\x69\156\143\154\x75\x64\x65\x73\57\x69\x6d\x61\x67\x65\56\x70\150\160";
$JH = wp_generate_attachment_metadata($kU, $qF);
wp_update_attachment_metadata($kU, $JH);
rC:
do_action($this->option_prefix . "\x73\x65\x74\137\x6d\x6f\162\145\x5f\141\164\164\141\x63\150\x6d\145\156\x74\137\x64\x61\x74\x61", $kU, $rH, "\x63\162\x65\x61\164\145");
goto pe;
Jv:
$v1 = false;
$errors = $kU;
pe:
$FH = array("\144\141\x74\x61" => array($wM => $kU, "\x73\165\x63\143\x65\163\163" => $v1), "\x65\162\162\x6f\x72\163" => $errors);
return $FH;
}
private function term_create($rH, $zo, $wM = "\111\x44")
{
if (!("\164\141\147" === $zo)) {
goto zF;
}
$zo = "\160\x6f\163\164\x5f\x74\x61\147";
zF:
$tv = array();
$J0 = $this->get_wordpress_table_structure($zo);
$u1 = array();
foreach ($rH as $Ac => $mT) {
if (!("\x6e\x61\155\x65" === $Ac)) {
goto id;
}
$J5 = $mT["\x76\x61\154\x75\145"];
unset($rH[$Ac]);
id:
if (!(in_array($mT["\155\145\164\x68\x6f\144\x5f\155\x6f\144\x69\x66\x79"], $J0["\143\x6f\156\164\x65\x6e\x74\x5f\155\x65\x74\150\157\144\x73"], true) && "\x6e\x61\155\145" !== $Ac)) {
goto LE;
}
$u1[$Ac] = $mT["\x76\141\154\165\145"];
unset($rH[$Ac]);
LE:
GT:
}
h_:
if (!isset($J5)) {
goto Pa;
}
$sa = wp_insert_term($J5, $zo, $u1);
Pa:
if (is_wp_error($sa)) {
goto Ds;
}
$Hv = $sa["{$wM}"];
$Hn = $this->create_wp_meta($rH, $Hv, "\164\145\162\x6d");
$v1 = $Hn["\163\165\x63\143\x65\163\x73"];
$errors = $Hn["\145\162\162\157\162\x73"];
do_action($this->option_prefix . "\x73\145\164\x5f\155\x6f\162\x65\x5f\164\145\x72\x6d\137\x64\x61\x74\x61", $Hv, $rH, "\143\x72\145\141\164\145");
goto Uh;
Ds:
$v1 = false;
$errors = $sa;
Uh:
if (is_wp_error($sa)) {
goto Yr;
}
$v1 = true;
$errors = array();
goto Wh;
Yr:
$v1 = false;
$errors = $sa;
Wh:
$FH = array("\144\x61\164\x61" => array($wM => $Hv, "\163\165\x63\143\145\163\x73" => $v1), "\x65\x72\162\x6f\x72\x73" => $errors);
return $FH;
}
private function comment_create($rH, $wM = "\x63\x6f\x6d\x6d\x65\x6e\x74\x5f\111\x44")
{
$tv = array();
$J0 = $this->get_wordpress_table_structure("\x63\157\x6d\x6d\x65\156\164");
foreach ($rH as $Ac => $mT) {
if (!in_array($mT["\155\145\164\150\x6f\x64\x5f\x6d\157\x64\151\x66\171"], $J0["\x63\x6f\x6e\x74\x65\x6e\x74\x5f\x6d\x65\x74\150\157\144\163"], true)) {
goto bE;
}
$tv[$Ac] = $mT["\x76\141\x6c\x75\x65"];
unset($rH[$Ac]);
bE:
FQ:
}
lB:
if (isset($tv["\x63\x6f\x6d\155\x65\x6e\x74\x5f\x61\x75\x74\150\x6f\162"])) {
goto dk;
}
$tv["\143\157\155\155\x65\156\x74\137\x61\x75\x74\150\157\x72"] = '';
dk:
if (isset($tv["\x63\x6f\155\155\145\156\164\x5f\141\x75\164\x68\157\162\137\111\x50"])) {
goto Of;
}
$tv["\143\157\x6d\155\x65\156\x74\137\x61\165\164\150\x6f\x72\137\111\x50"] = '';
Of:
if (isset($tv["\143\157\x6d\155\145\x6e\164\137\141\165\164\x68\157\x72\137\145\x6d\x61\151\x6c"])) {
goto q1;
}
$tv["\143\157\x6d\155\145\156\164\x5f\x61\165\x74\150\x6f\x72\x5f\145\x6d\x61\151\x6c"] = '';
q1:
if (isset($tv["\x63\157\x6d\155\145\156\164\x5f\141\165\164\x68\x6f\162\x5f\x75\162\154"])) {
goto i3;
}
$tv["\x63\157\x6d\155\x65\156\x74\x5f\x61\x75\x74\150\x6f\x72\x5f\165\162\154"] = '';
i3:
if (isset($tv["\x63\157\155\x6d\x65\x6e\x74\137\x74\x79\160\145"])) {
goto Iz;
}
$tv["\143\x6f\x6d\155\x65\x6e\x74\x5f\164\171\160\145"] = '';
Iz:
$cz = wp_new_comment($tv);
if (is_wp_error($cz)) {
goto La;
}
$Hn = $this->create_wp_meta($rH, $cz, "\x63\x6f\x6d\155\x65\x6e\x74");
$v1 = $Hn["\x73\x75\x63\143\x65\x73\163"];
$errors = $Hn["\x65\162\162\x6f\x72\x73"];
do_action($this->option_prefix . "\x73\x65\164\137\x6d\157\x72\x65\137\x63\157\x6d\x6d\x65\x6e\164\137\x64\x61\164\141", $cz, $rH, "\x63\x72\x65\141\x74\x65");
goto Ir;
La:
$v1 = false;
$errors = $cz;
Ir:
if (is_wp_error($cz)) {
goto bF;
}
$v1 = true;
$errors = array();
goto b2;
bF:
$v1 = false;
$errors = $cz;
b2:
$FH = array("\144\x61\164\141" => array($wM => $cz, "\163\165\143\x63\x65\163\x73" => $v1), "\x65\x72\162\157\x72\x73" => $errors);
return $FH;
}
public function object_upsert($J5, $Ac, $mT, $rH, $yA = false, $El = array(), $eC = false)
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["\x69\x64\x5f\x66\151\x65\x6c\x64"];
if (!isset($rH[$Ac])) {
goto PH;
}
unset($rH[$Ac]);
PH:
$Ac = apply_filters($this->option_prefix . "\x6d\x6f\x64\x69\x66\171\x5f\x75\160\x73\x65\162\x74\x5f\153\145\x79", $Ac);
$mT = apply_filters($this->option_prefix . "\155\x6f\x64\x69\146\171\137\165\x70\x73\145\x72\x74\x5f\x76\141\154\x75\145", $mT);
switch ($J5) {
case "\165\163\145\162":
$FH = $this->user_upsert($Ac, $mT, $rH, $wM, $El, $yA, $eC);
goto mm;
case "\x70\157\x73\x74":
$FH = $this->post_upsert($Ac, $mT, $El, $rH, $wM, $yA, $J5, $eC);
goto mm;
case "\141\x74\164\141\x63\x68\x6d\145\156\164":
$FH = $this->attachment_upsert($Ac, $mT, $rH, $wM, $El, $eC);
goto mm;
case "\x63\x61\164\x65\147\157\162\171":
case "\164\x61\147":
case "\x70\x6f\x73\x74\x5f\164\141\147":
$FH = $this->term_upsert($Ac, $mT, $rH, $J5, $wM, $eC, $El);
goto mm;
case "\143\157\x6d\x6d\x65\156\164":
$FH = $this->comment_upsert($Ac, $mT, $El, $rH, $wM, $yA, $eC);
goto mm;
case "\x70\x6d\x70\162\x6f\137\x6f\x72\144\x65\x72\x73":
$FH = $this->pmpro_orders_upsert($J5, $Ac, $mT, $rH, $wM);
goto mm;
default:
if (!has_filter($this->option_prefix . "\165\x70\x73\x65\x72\x74\137\143\x75\163\x74\157\x6d\x5f\x77\157\162\144\160\162\145\163\163\137\x69\164\x65\x6d")) {
goto ip;
}
$FH = apply_filters($this->option_prefix . "\x75\160\x73\x65\162\x74\137\143\165\x73\x74\157\155\x5f\x77\x6f\162\x64\160\162\x65\x73\163\137\x69\x74\145\155", array("\153\145\171" => $Ac, "\166\x61\154\x75\x65" => $mT, "\x6d\145\164\x68\157\x64\163" => $El, "\x70\x61\x72\141\155\x73" => $rH, "\x69\144\137\x66\151\x65\154\144" => $wM, "\x70\165\154\x6c\137\x74\x6f\x5f\144\x72\x61\146\x74\163" => $yA, "\x6e\x61\155\x65" => $J5, "\143\150\145\143\153\x5f\157\156\154\x79" => $eC));
goto mW;
ip:
$FH = $this->post_upsert($Ac, $mT, $El, $rH, $wM, $yA, $J5, $eC);
mW:
goto mm;
}
bl:
mm:
return $FH;
}
public function pmpro_orders_upsert($J5, $Ac, $mT, $rH, $wM)
{
$FH = PaidMemberShipProIntegration::mo_sf_sync_get_order_id($Ac, $mT);
return $FH;
}
private function user_upsert($Ac, $mT, $rH, $wM = "\x49\x44", $El = array(), $yA = false, $eC = false)
{
$uP = "\x57\x50\x5f\x55\163\145\x72\137\121\165\145\162\x79";
if ('' !== $uP) {
goto q8;
}
$rH[$Ac] = array("\166\x61\154\165\145" => $mT, "\155\x65\x74\150\157\x64\x5f\155\157\144\x69\x66\171" => $El["\155\145\164\x68\157\x64\x5f\155\157\x64\151\146\x79"], "\155\145\x74\150\157\144\137\x72\x65\141\144" => $El["\x6d\145\x74\150\157\144\x5f\x72\x65\141\144"]);
if (!isset($rH["\165\x73\x65\x72\x5f\x65\x6d\x61\151\x6c"]["\x76\x61\x6c\x75\x65"])) {
goto Ty;
}
$iH = $rH["\x75\163\145\x72\x5f\x65\x6d\141\151\x6c"]["\x76\141\154\x75\x65"];
$Ut = $rH["\165\x73\145\x72\x5f\x65\x6d\x61\151\x6c"]["\166\x61\154\165\145"];
Ty:
if (!isset($rH["\165\163\145\x72\137\154\x6f\x67\x69\x6e"]["\166\x61\x6c\165\145"])) {
goto YO;
}
$iH = $rH["\165\163\x65\x72\137\x6c\157\147\x69\156"]["\x76\x61\154\x75\145"];
YO:
$vq = username_exists($iH);
if (false === $vq && false === $eC) {
goto dS;
}
if (true === $eC) {
goto yN;
}
$nc = $vq;
goto Xo;
dS:
$FH = $this->user_create($rH);
return $FH;
goto Xo;
yN:
return $vq;
Xo:
goto LL;
q8:
if (class_exists($uP)) {
goto N5;
}
$user = $uP(str_replace("\165\x73\x65\x72\137", '', $Ac), $mT);
goto vi;
N5:
$u1 = array("\x6d\145\x74\x61\x5f\161\165\x65\162\x79" => array(array("\x6b\145\171" => $Ac, "\166\x61\x6c\165\145" => $mT)));
$De = new $uP($u1);
$Gh = $De->get_results();
if (empty($Gh)) {
goto V5;
}
$user = $Gh[0];
V5:
vi:
if (isset($user) && isset($user->{$wM})) {
goto LY;
}
if (false === $eC) {
goto I1;
}
return null;
goto Ik;
LY:
$nc = $user->{$wM};
if (!(true === $eC)) {
goto ML;
}
return $nc;
ML:
if (isset($El["\x6d\x65\164\150\157\x64\137\165\x70\x64\x61\x74\x65"])) {
goto A5;
}
$uP = $El["\155\145\164\150\157\x64\137\x6d\x6f\x64\151\x66\x79"];
goto Rx;
A5:
$uP = $El["\155\x65\x74\x68\157\x64\137\165\x70\144\x61\164\x65"];
Rx:
$rH[$Ac] = array("\x76\x61\x6c\x75\145" => $mT, "\155\145\164\150\x6f\144\x5f\155\x6f\x64\x69\x66\x79" => $uP, "\155\145\164\150\x6f\144\x5f\162\x65\141\x64" => $El["\x6d\x65\164\x68\x6f\144\x5f\x72\145\141\x64"]);
goto Ik;
I1:
if (isset($El["\155\145\164\x68\157\144\137\x63\x72\x65\141\x74\145"])) {
goto WP;
}
$uP = $El["\x6d\145\x74\x68\x6f\x64\x5f\x6d\157\x64\x69\x66\x79"];
goto fv;
WP:
$uP = $El["\x6d\x65\x74\x68\157\x64\x5f\143\x72\145\141\164\x65"];
fv:
$rH[$Ac] = array("\x76\x61\154\x75\145" => $mT, "\155\145\x74\150\157\144\137\155\157\x64\151\146\171" => $uP, "\155\145\x74\x68\157\144\137\162\x65\x61\144" => $El["\155\x65\x74\x68\x6f\144\137\x72\x65\x61\x64"]);
$FH = $this->user_create($rH);
return $FH;
Ik:
LL:
if (!isset($nc)) {
goto Uf;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["\x6d\x65\x74\x68\x6f\144\137\x6d\157\144\x69\146\171"] = $El["\x6d\x65\x74\x68\x6f\x64\x5f\x75\160\x64\x61\164\x65"];
rS:
}
Dy:
$FH = $this->user_update($nc, $rH);
return $FH;
Uf:
if (isset($this->logging)) {
goto WV;
}
if (class_exists("\117\142\152\145\x63\164\x5f\x53\171\156\143\137\x53\x66\x5f\114\157\147\x67\151\x6e\147")) {
goto pN;
}
goto CS;
WV:
$tR = $this->logging;
goto CS;
pN:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
CS:
$CG = "\x65\162\x72\157\x72";
$el = sprintf(esc_html__("\x25\61\x24\x73\72\40\x55\163\x65\162\x73\72\x20\124\162\x69\145\x64\x20\x74\157\40\162\x75\156\40\x75\163\x65\x72\137\165\x70\x73\x65\162\x74\54\x20\x61\156\x64\x20\145\x6e\144\145\144\x20\x75\160\40\x77\151\164\150\x6f\x75\x74\x20\141\x20\x75\x73\145\162\40\151\x64", "\157\142\x6a\x65\143\164\x2d\x73\x79\156\x63\x2d\x66\157\162\x2d\x73\141\x6c\145\x73\146\157\162\143\145"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function user_update($nc, $rH, $wM = "\111\x44")
{
$tv = array();
$tv[$wM] = $nc;
foreach ($rH as $Ac => $mT) {
if (!("\x75\x73\x65\162\x5f\145\x6d\x61\x69\154" === $Ac && email_exists($mT["\166\x61\154\x75\145"]))) {
goto aj;
}
unset($rH[$Ac]);
goto AT;
aj:
if (!("\x75\163\x65\162\137\154\157\x67\x69\156" === $Ac && username_exists($mT["\x76\x61\x6c\165\145"]))) {
goto H1;
}
unset($rH[$Ac]);
goto AT;
H1:
if (!("\167\x70\137\x75\160\x64\x61\164\x65\x5f\165\163\145\x72" === $mT["\x6d\x65\164\150\157\144\x5f\x6d\157\144\151\146\x79"])) {
goto m7;
}
$tv[$Ac] = $mT["\x76\141\154\165\145"];
unset($rH[$Ac]);
m7:
AT:
}
VI:
$nc = wp_update_user($tv);
if (is_wp_error($nc)) {
goto iE;
}
$Hn = $this->update_wp_meta($rH, $nc, "\x75\163\x65\162");
$v1 = $Hn["\x73\165\x63\x63\x65\x73\x73"];
$errors = $Hn["\145\162\x72\157\x72\x73"];
do_action($this->option_prefix . "\x73\x65\x74\137\x6d\x6f\162\x65\137\165\x73\x65\x72\137\x64\141\x74\x61", $nc, $rH, "\x75\x70\144\x61\164\145");
goto zS;
iE:
$v1 = false;
$errors = $nc;
zS:
$FH = array("\144\x61\164\x61" => array($wM => $nc, "\x73\165\143\x63\145\x73\x73" => $v1), "\x65\x72\x72\157\162\163" => $errors);
return $FH;
}
private function update_wp_meta($rH, $h3, $LB)
{
$v1 = true;
$qC = false;
$errors = array();
if (!(!is_wp_error($h3) && is_array($rH) && !empty($rH))) {
goto Av;
}
$qC = true;
foreach ($rH as $Ac => $mT) {
$EA = $mT["\155\x65\164\150\x6f\144\x5f\155\x6f\x64\x69\146\x79"];
if (!('' === $mT["\166\x61\x6c\165\145"])) {
goto pi;
}
$EA = isset($mT["\155\x65\x74\150\157\144\x5f\x64\145\154\145\x74\x65"]) ? $mT["\x6d\x65\164\x68\157\x64\137\144\145\x6c\145\164\x65"] : $mT["\155\x65\x74\150\x6f\144\x5f\x6d\157\144\x69\146\x79"];
pi:
$NO = $mT["\x6d\145\x74\150\157\x64\x5f\162\x65\141\x64"];
$Yj = $EA($h3, $Ac, $mT["\x76\x61\x6c\x75\145"]);
if (!(false === $Yj)) {
goto vA;
}
$qC = false;
if (is_array($mT["\166\141\154\165\x65"])) {
goto wT;
}
$Uh = (string) $mT["\x76\141\x6c\x75\x65"];
goto vS;
wT:
$Uh = maybe_serialize($mT["\x76\x61\154\x75\x65"]);
vS:
if (is_array($NO($h3, $Ac, true))) {
goto fc;
}
$eP = (string) $NO($h3, $Ac, true);
goto j0;
fc:
$eP = maybe_serialize($NO($h3, $Ac, true));
j0:
if (!($eP !== $Uh)) {
goto UB;
}
$errors[] = array("\155\x65\163\x73\x61\x67\145" => sprintf(esc_html__("\x55\x6e\141\142\x6c\x65\x20\164\x6f\x20\x75\160\x64\141\164\x65\x20\45\x31\44\163\x20\155\x65\x74\x61\x20\153\x65\x79\40\45\x32\44\x73\x20\167\x69\x74\150\x20\x6d\145\164\150\x6f\144\x20\x25\x33\x24\163\56\40\124\x68\x65\x20\163\x74\x6f\x72\145\144\x20\x76\141\154\x75\145\40\151\x73\40\45\x34\x24\163\x20\141\x6e\144\40\x74\150\145\x20\x6e\145\167\x20\166\141\154\165\x65\40\163\150\157\x75\x6c\144\40\142\x65\x20\x25\x35\x24\x73\x2e", "\x6f\142\152\145\x63\164\55\x73\171\156\x63\55\146\x6f\x72\55\163\141\154\x65\163\x66\157\162\143\x65"), esc_attr($LB), esc_attr($Ac), esc_attr($EA), wp_kses_post($eP), wp_kses_post($Uh)));
UB:
vA:
ME:
}
EZ:
Av:
$Hn = array("\x73\x75\x63\x63\x65\x73\x73" => $v1, "\143\150\141\x6e\147\145\x64" => $qC, "\x65\x72\x72\x6f\x72\x73" => $errors);
return $Hn;
}
private function post_upsert($Ac, $mT, $El = array(), $rH = array(), $wM = "\x49\x44", $yA = false, $dR = "\x70\157\x73\164", $eC = false)
{
$uP = $El["\x6d\145\x74\x68\157\x64\x5f\155\141\164\x63\150"];
if ('' !== $uP) {
goto ra;
}
$rH[$Ac] = array("\x76\x61\x6c\x75\145" => $mT, "\155\145\x74\150\157\x64\137\x6d\x6f\x64\x69\146\x79" => $El["\155\145\164\150\157\144\137\155\157\x64\x69\x66\x79"], "\x6d\145\164\x68\157\x64\137\162\145\141\144" => $El["\155\x65\x74\150\157\144\137\162\145\141\x64"]);
if (!isset($rH["\160\x6f\x73\x74\x5f\x74\x69\164\154\x65"]["\x76\x61\154\x75\x65"])) {
goto iC;
}
$el = $rH["\160\x6f\163\164\137\164\x69\164\154\145"]["\166\141\x6c\165\x65"];
iC:
if (isset($rH["\x70\x6f\x73\x74\137\143\157\x6e\164\x65\156\164"]["\166\x61\x6c\x75\x65"])) {
goto G0;
}
$tv = '';
goto pl;
G0:
$tv = $rH["\160\x6f\163\164\x5f\143\157\x6e\164\145\156\164"]["\166\x61\154\165\x65"];
pl:
if (isset($rH["\x70\157\163\164\x5f\x64\x61\x74\x65"]["\x76\x61\x6c\165\x65"])) {
goto VV;
}
$UZ = '';
goto ox;
VV:
$UZ = $rH["\160\x6f\163\164\x5f\144\x61\x74\x65"]["\x76\141\154\165\x65"];
ox:
$vq = post_exists($el, $tv, $UZ);
if (0 === $vq && false === $eC) {
goto eX;
}
if (true === $eC) {
goto FM;
}
$BM = $vq;
goto V3;
eX:
$FH = $this->post_create($rH, $wM, $dR);
return $FH;
goto V3;
FM:
return $vq;
V3:
return $FH;
goto K8;
ra:
$u1 = array();
if ("\x70\157\x73\164\137\x74\151\x74\x6c\145" === $Ac) {
goto QW;
}
$u1[$Ac] = $mT;
goto Re;
QW:
$rH["\x70\x6f\163\164\137\x74\151\164\154\x65"] = array("\x76\141\154\165\145" => $mT, "\x6d\145\164\x68\157\x64\x5f\x6d\157\144\x69\146\x79" => $uP, "\x6d\x65\164\x68\x6f\144\x5f\x72\145\x61\x64" => $El["\x6d\145\x74\150\157\x64\x5f\x72\145\141\144"]);
$u1["\156\141\x6d\145"] = sanitize_title($mT);
Re:
$u1["\160\157\163\164\x5f\x74\171\x70\x65"] = $dR;
$At = array("\160\165\x62\154\151\163\x68");
if (!(true === filter_var($yA, FILTER_VALIDATE_BOOLEAN))) {
goto Lg;
}
$At[] = "\x64\x72\141\146\x74";
Lg:
$u1["\160\x6f\x73\x74\137\163\x74\x61\x74\x75\163"] = $At;
if (class_exists($uP)) {
goto H0;
}
$gY = $uP($u1);
goto Ey;
H0:
unset($u1[$Ac]);
$u1["\155\x65\x74\141\x5f\x71\x75\145\x72\171"] = array(array("\x6b\x65\171" => $Ac, "\x76\141\154\165\x65" => $mT));
$De = new $uP($u1);
$gY = $De->get_posts();
Ey:
if (isset($gY) && isset($gY[0]->{$wM})) {
goto O7;
}
if (false === $eC) {
goto Ih;
}
return null;
goto nT;
O7:
$BM = $gY[0]->{$wM};
if (!(true === $eC)) {
goto Ye;
}
return $BM;
Ye:
if (isset($El["\x6d\x65\164\150\157\144\137\165\160\144\141\x74\145"])) {
goto uJ;
}
$uP = $El["\x6d\145\x74\150\x6f\x64\x5f\x6d\157\x64\x69\x66\x79"];
goto Kc;
uJ:
$uP = $El["\155\x65\x74\150\157\144\137\x75\x70\144\x61\164\145"];
Kc:
$rH[$Ac] = array("\x76\141\x6c\165\145" => $mT, "\x6d\145\164\x68\x6f\x64\x5f\155\x6f\144\x69\146\171" => $uP, "\155\145\164\x68\x6f\144\137\162\145\x61\x64" => $El["\x6d\x65\x74\x68\x6f\144\x5f\x72\x65\x61\x64"]);
goto nT;
Ih:
if (isset($El["\155\x65\x74\150\157\x64\x5f\143\162\x65\x61\x74\145"])) {
goto t5;
}
$uP = $El["\x6d\x65\164\x68\157\144\x5f\155\157\144\151\146\171"];
goto QT;
t5:
$uP = $El["\x6d\145\164\150\x6f\x64\x5f\x63\x72\x65\141\164\x65"];
QT:
$rH[$Ac] = array("\166\x61\154\x75\x65" => $mT, "\x6d\145\x74\150\x6f\144\x5f\x6d\x6f\144\x69\x66\171" => $uP, "\155\145\164\x68\x6f\x64\137\x72\x65\x61\x64" => $El["\155\145\164\x68\x6f\144\137\162\x65\x61\x64"]);
$FH = $this->post_create($rH, $wM, $dR);
return $FH;
nT:
K8:
if (!isset($BM)) {
goto s7;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["\155\x65\164\x68\157\x64\137\x6d\x6f\144\151\146\x79"] = $El["\155\x65\164\150\x6f\x64\137\165\160\144\x61\x74\x65"];
NB:
}
Kl:
$FH = $this->post_update($BM, $rH, $wM, $dR);
return $FH;
s7:
}
private function post_update($BM, $rH, $wM = "\x49\104", $dR = '')
{
$tv = array();
$tv[$wM] = $BM;
foreach ($rH as $Ac => $mT) {
if (!("\x77\160\137\x75\160\144\141\164\145\137\x70\157\163\164" === $mT["\x6d\145\x74\150\x6f\144\137\155\x6f\x64\151\x66\x79"])) {
goto wC;
}
$tv[$Ac] = $mT["\x76\141\154\165\x65"];
unset($rH[$Ac]);
wC:
jj:
}
S7:
if (!('' !== $dR)) {
goto X2;
}
$tv["\x70\157\x73\x74\x5f\x74\x79\x70\145"] = $dR;
X2:
$BM = wp_update_post($tv, true);
if (is_wp_error($BM)) {
goto xS;
}
if (!isset($rH["\x52\x65\x63\x6f\x72\144\124\171\x70\145\x49\x64"]["\166\141\x6c\x75\x65"])) {
goto lu;
}
$rH["\122\145\143\x6f\x72\x64\x54\x79\160\x65\111\x64"]["\x6d\145\x74\x68\157\x64\x5f\155\157\144\x69\x66\171"] = "\x75\x70\144\141\x74\145\x5f\x70\157\x73\164\x5f\x6d\x65\164\141";
$rH["\x52\145\x63\x6f\x72\x64\x54\x79\x70\145\x49\x64"]["\155\145\x74\150\157\x64\x5f\162\x65\141\144"] = "\x67\145\x74\x5f\x70\x6f\x73\164\137\155\145\164\141";
lu:
$Hn = $this->update_wp_meta($rH, $BM, "\160\x6f\163\164");
$v1 = $Hn["\x73\165\x63\x63\x65\163\x73"];
$errors = $Hn["\145\x72\x72\x6f\162\x73"];
do_action($this->option_prefix . "\163\x65\164\137\155\157\162\145\x5f\x70\157\163\x74\x5f\x64\141\x74\141", $BM, $rH, "\x75\160\x64\x61\164\145");
goto yf;
xS:
$v1 = false;
$errors = $BM;
yf:
$FH = array("\x64\x61\164\x61" => array($wM => $BM, "\x73\x75\143\143\x65\163\x73" => $v1), "\145\162\x72\157\162\x73" => $errors);
return $FH;
}
private function attachment_upsert($Ac, $mT, $rH, $wM = "\111\x44", $El = array(), $eC = false)
{
$uP = $El["\x6d\x65\164\x68\157\144\137\x6d\141\164\x63\x68"];
if ('' !== $uP) {
goto hT;
}
$rH[$Ac] = array("\166\141\154\x75\145" => $mT, "\x6d\x65\164\150\x6f\144\x5f\x6d\x6f\x64\151\x66\171" => $El["\155\x65\x74\150\x6f\x64\137\155\157\144\x69\x66\171"], "\x6d\x65\x74\150\157\x64\137\162\145\x61\x64" => $El["\x6d\x65\164\150\x6f\x64\x5f\x72\x65\141\x64"]);
if (!isset($rH["\160\x6f\163\x74\137\164\151\x74\154\145"]["\x76\141\154\165\145"])) {
goto u2;
}
$el = $rH["\160\x6f\x73\x74\137\x74\x69\164\x6c\x65"]["\166\141\x6c\165\x65"];
u2:
if (isset($rH["\160\157\x73\164\x5f\x63\x6f\x6e\x74\145\x6e\164"]["\x76\x61\x6c\165\x65"])) {
goto vr;
}
$tv = '';
goto ek;
vr:
$tv = $rH["\160\x6f\x73\x74\137\143\x6f\156\164\145\156\x74"]["\x76\141\154\165\x65"];
ek:
if (isset($rH["\x70\x6f\x73\164\x5f\x64\141\164\145"]["\x76\141\x6c\x75\x65"])) {
goto oZ;
}
$UZ = '';
goto JS;
oZ:
$UZ = $rH["\160\x6f\163\x74\137\x64\141\x74\145"]["\166\141\x6c\165\x65"];
JS:
$vq = post_exists($el, $tv, $UZ);
if (0 === $vq && false === $eC) {
goto Z8;
}
if (true === $eC) {
goto qT;
}
$kU = $vq;
goto ce;
Z8:
$FH = $this->attachment_create($rH);
return $FH;
goto ce;
qT:
return $vq;
ce:
return $FH;
goto rH;
hT:
$u1 = array();
if ("\160\157\163\x74\137\x74\151\164\x6c\x65" === $Ac) {
goto AC;
}
$u1[$Ac] = $mT;
goto dG;
AC:
$rH["\160\x6f\163\x74\x5f\x74\151\x74\154\145"] = array("\166\x61\x6c\x75\145" => $mT, "\155\145\x74\150\x6f\144\x5f\155\x6f\x64\x69\x66\x79" => $uP, "\155\145\164\x68\x6f\x64\x5f\x72\x65\141\144" => $El["\155\145\164\x68\x6f\144\x5f\162\145\141\x64"]);
$u1["\156\x61\x6d\145"] = sanitize_title($mT);
dG:
$u1["\160\157\x73\164\137\x74\x79\x70\145"] = "\x61\x74\164\141\143\x68\155\x65\x6e\164";
if (class_exists($uP)) {
goto hv;
}
$gY = $uP($u1);
goto eA;
hv:
unset($u1[$Ac]);
$u1["\x6d\x65\164\141\137\161\x75\145\x72\x79"] = array(array("\x6b\x65\171" => $Ac, "\x76\141\x6c\x75\x65" => $mT));
$De = new $uP($u1);
$gY = $De->get_results();
eA:
if (isset($gY) && isset($gY[0]->{$wM})) {
goto P1;
}
if (false === $eC) {
goto vk;
}
return null;
goto KS;
P1:
$kU = $gY[0]->{$wM};
if (!(true === $eC)) {
goto Gj;
}
return $kU;
Gj:
if (isset($El["\155\x65\164\150\x6f\144\x5f\165\x70\144\x61\x74\145"])) {
goto ht;
}
$uP = $El["\155\145\x74\x68\x6f\144\x5f\x6d\x6f\144\x69\146\x79"];
goto U8;
ht:
$uP = $El["\x6d\145\x74\150\x6f\144\x5f\x75\x70\x64\141\164\x65"];
U8:
$rH[$Ac] = array("\x76\x61\154\x75\145" => $mT, "\155\x65\164\x68\157\x64\137\x6d\157\144\151\146\x79" => $uP, "\155\x65\164\150\x6f\144\137\162\145\141\x64" => $El["\155\x65\164\x68\157\x64\137\162\x65\x61\144"]);
goto KS;
vk:
if (isset($El["\x6d\145\x74\x68\x6f\x64\137\143\x72\x65\141\164\x65"])) {
goto Kh;
}
$uP = $El["\155\145\164\x68\x6f\144\137\155\157\x64\151\x66\171"];
goto WC;
Kh:
$uP = $El["\155\x65\x74\150\157\144\x5f\x63\162\x65\141\164\145"];
WC:
$rH[$Ac] = array("\166\x61\x6c\x75\x65" => $mT, "\155\145\164\150\157\x64\137\155\157\x64\151\x66\x79" => $uP, "\155\x65\164\x68\x6f\x64\x5f\162\145\x61\x64" => $El["\x6d\145\164\150\157\x64\137\162\x65\x61\x64"]);
$FH = $this->attachment_create($rH);
return $FH;
KS:
rH:
if (!isset($kU)) {
goto Kv;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["\155\145\x74\x68\x6f\144\137\155\x6f\144\151\146\171"] = $El["\x6d\145\x74\x68\x6f\144\x5f\x75\x70\x64\141\164\x65"];
CR:
}
xw:
$FH = $this->attachment_update($kU, $rH);
return $FH;
Kv:
if (isset($this->logging)) {
goto Vj;
}
if (class_exists("\x4f\142\x6a\x65\x63\164\x5f\123\171\156\143\137\123\x66\137\x4c\157\x67\x67\151\x6e\x67")) {
goto xR;
}
goto wa;
Vj:
$tR = $this->logging;
goto wa;
xR:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
wa:
$CG = "\145\162\162\157\x72";
$el = sprintf(esc_html__("\x25\61\44\x73\x3a\x20\101\x74\164\x61\x63\x68\x6d\145\x6e\164\163\x3a\x20\124\x72\x69\145\x64\40\164\157\40\x72\165\156\x20\141\x74\x74\141\143\150\x6d\145\156\164\x5f\165\160\163\x65\162\164\x2c\x20\x61\x6e\x64\x20\145\x6e\144\x65\144\x20\165\160\40\167\x69\x74\150\x6f\x75\164\x20\141\156\x20\x61\x74\164\x61\143\150\155\x65\156\x74\40\151\144", "\x6f\x62\x6a\x65\x63\x74\x2d\163\x79\156\143\x2d\146\157\x72\x2d\x73\x61\x6c\x65\163\146\157\x72\143\145"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function attachment_update($kU, $rH, $wM = "\111\x44")
{
$tv = array();
$tv[$wM] = $kU;
foreach ($rH as $Ac => $mT) {
if (!("\x77\160\137\x69\x6e\163\x65\162\164\137\141\164\x74\141\x63\150\155\145\156\x74" === $mT["\155\x65\164\150\157\x64\137\155\157\x64\x69\146\171"])) {
goto V6;
}
$tv[$Ac] = $mT["\x76\141\x6c\165\145"];
unset($rH[$Ac]);
V6:
Wm:
}
fi:
if (isset($rH["\x66\x69\x6c\x65\156\x61\x6d\x65"]["\x76\141\154\165\x65"])) {
goto L_;
}
$qF = false;
goto K2;
L_:
$qF = $rH["\146\151\154\145\x6e\x61\x6d\x65"]["\x76\x61\x6c\165\145"];
K2:
if (isset($rH["\x70\x61\x72\x65\x6e\164"]["\x76\141\154\x75\145"])) {
goto Ry;
}
$GK = 0;
goto uv;
Ry:
$GK = $rH["\x70\x61\162\145\x6e\164"]["\x76\141\154\165\145"];
uv:
$kU = wp_insert_attachment($tv, $qF, $GK);
if (is_wp_error($kU)) {
goto zo;
}
$v1 = true;
$errors = array();
if (!(false !== $qF)) {
goto mY;
}
require_once ABSPATH . "\x77\x70\55\141\144\155\x69\x6e\x2f\x69\156\143\x6c\165\x64\x65\x73\57\151\x6d\x61\147\x65\56\x70\x68\x70";
$JH = wp_generate_attachment_metadata($kU, $qF);
mY:
$sg = array();
foreach ($rH as $Ac => $mT) {
$uP = $mT["\x6d\x65\x74\150\x6f\x64\137\x6d\157\144\151\146\x79"];
$sg[$Ac] = $mT["\x76\x61\x6c\x75\x65"];
UH:
}
B2:
if (isset($JH)) {
goto hq;
}
$JH = $sg;
goto sS;
hq:
$JH = array_merge($JH, $sg);
sS:
$A0 = wp_update_attachment_metadata($kU, $JH);
if (!(false === $A0)) {
goto JV;
}
$v1 = false;
$errors[] = array("\153\x65\171" => $Ac, "\x76\141\x6c\165\x65" => $mT);
JV:
if (!(0 !== $GK)) {
goto Pj;
}
set_post_thumbnail($Tx, $kU);
Pj:
do_action($this->option_prefix . "\x73\145\164\137\x6d\157\162\145\137\141\x74\x74\141\x63\x68\x6d\145\156\x74\137\144\141\164\x61", $kU, $rH, "\x75\160\144\141\x74\x65");
goto ay;
zo:
$v1 = false;
$errors = $kU;
ay:
$FH = array("\x64\x61\164\x61" => array($wM => $kU, "\163\x75\143\x63\x65\163\163" => $v1), "\x65\x72\x72\x6f\162\163" => $errors);
return $FH;
}
private function term_upsert($Ac, $mT, $rH, $zo, $wM = "\111\104", $yA = false, $eC = false, $El = array())
{
if (!("\164\141\147" === $zo)) {
goto n5;
}
$zo = "\x70\157\163\x74\137\x74\141\x67";
n5:
$uP = $El["\155\145\x74\x68\x6f\x64\x5f\x6d\141\x74\x63\x68"];
if ('' !== $uP) {
goto Fj;
}
$rH[$Ac] = array("\166\x61\x6c\165\145" => $mT, "\155\145\164\150\x6f\144\137\x6d\x6f\x64\151\146\171" => $El["\x6d\x65\x74\x68\157\x64\x5f\155\157\144\x69\x66\x79"], "\x6d\145\x74\150\157\x64\137\162\145\x61\144" => $El["\x6d\x65\164\150\x6f\144\x5f\162\x65\141\144"]);
if (!isset($rH["\156\141\155\x65"]["\x76\x61\x6c\165\x65"])) {
goto E4;
}
$sa = $rH["\x6e\141\x6d\145"]["\166\141\154\x75\145"];
E4:
if (isset($rH["\x70\141\162\145\x6e\x74"]["\x76\141\154\x75\x65"])) {
goto l3;
}
$GK = 0;
goto IC;
l3:
$GK = $rH["\x70\141\162\x65\x6e\164"]["\166\x61\x6c\165\145"];
IC:
if (function_exists("\167\x70\x63\157\155\137\166\x69\x70\137\164\x65\162\155\x5f\145\170\x69\163\x74\163")) {
goto gZ;
}
$vq = term_exists($sa, $zo, $GK);
goto eK;
gZ:
$vq = wpcom_vip_term_exists($sa, $zo, $GK);
eK:
if (null === $vq && false === $eC) {
goto l_;
}
if (true === $eC) {
goto a4;
}
$Hv = $vq;
goto Jh;
l_:
$FH = $this->term_create($rH, $zo, $wM);
return $FH;
goto Jh;
a4:
return $vq;
Jh:
goto RK;
Fj:
if (class_exists($uP)) {
goto IM;
}
$sa = $uP($Ac, $mT, $zo);
goto mX;
IM:
$u1 = array("\164\141\x78\x6f\156\x6f\155\x79" => $zo, "\x6d\145\x74\x61\x5f\x6b\x65\171" => $Ac, "\155\x65\164\x61\x5f\166\141\154\x75\x65" => $mT);
$De = new $uP($u1);
$aR = $De->get_terms();
if (empty($aR)) {
goto R3;
}
$sa = $aR[0];
R3:
mX:
if (isset($sa) && isset($sa->{$wM})) {
goto Gs;
}
if (false === $eC) {
goto lE;
}
return null;
goto p6;
Gs:
$Hv = $sa->{$wM};
if (!(true === $eC)) {
goto u6;
}
return $Hv;
u6:
if (isset($El["\155\145\x74\x68\x6f\x64\137\165\160\x64\141\x74\145"])) {
goto Gl;
}
$uP = $El["\x6d\x65\x74\x68\157\144\x5f\155\x6f\x64\x69\x66\x79"];
goto dU;
Gl:
$uP = $El["\x6d\x65\x74\x68\157\x64\137\x75\x70\144\x61\x74\x65"];
dU:
$rH[$Ac] = array("\x76\141\x6c\x75\145" => $mT, "\155\145\x74\x68\x6f\144\x5f\x6d\157\x64\x69\146\x79" => $uP, "\155\x65\164\150\x6f\144\x5f\162\145\141\x64" => $El["\155\145\164\x68\157\144\137\162\x65\141\x64"]);
goto p6;
lE:
if (isset($El["\155\x65\x74\150\x6f\144\137\143\x72\x65\x61\164\x65"])) {
goto t9;
}
$uP = $El["\x6d\x65\164\150\x6f\x64\x5f\x6d\x6f\144\151\x66\171"];
goto s_;
t9:
$uP = $El["\155\145\x74\150\x6f\x64\x5f\x63\x72\x65\x61\x74\145"];
s_:
$rH[$Ac] = array("\x76\x61\x6c\x75\x65" => $mT, "\x6d\145\164\x68\157\144\137\155\157\144\151\146\x79" => $uP, "\x6d\x65\164\150\157\x64\137\x72\145\x61\x64" => $El["\x6d\145\164\x68\157\x64\x5f\x72\x65\x61\144"]);
$FH = $this->term_create($rH, $zo, $wM);
return $FH;
p6:
RK:
if (!isset($Hv)) {
goto nk;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["\x6d\145\164\150\157\144\x5f\155\157\144\x69\x66\x79"] = $El["\x6d\x65\x74\x68\x6f\144\137\165\160\144\x61\x74\x65"];
oW:
}
nK:
$FH = $this->term_update($Hv, $rH, $zo, $wM);
return $FH;
nk:
if (isset($this->logging)) {
goto IZ;
}
if (class_exists("\x4f\x62\152\145\x63\164\137\x53\x79\156\x63\x5f\x53\146\x5f\114\x6f\147\x67\x69\156\147")) {
goto kz;
}
goto kI;
IZ:
$tR = $this->logging;
goto kI;
kz:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
kI:
$CG = "\x65\162\162\157\162";
$el = sprintf(esc_html__("\45\x31\x24\x73\x3a\x20\124\x65\x72\155\163\72\x20\124\162\x69\x65\144\40\x74\x6f\x20\x72\165\156\x20\164\145\x72\155\137\165\160\x73\x65\162\x74\x2c\40\141\156\144\40\145\x6e\144\145\144\x20\x75\x70\x20\167\x69\164\x68\157\x75\164\40\x61\x20\164\x65\162\x6d\40\x69\x64", "\x6f\142\x6a\145\x63\x74\x2d\x73\x79\x6e\x63\x2d\x66\157\x72\x2d\x73\141\x6c\x65\x73\x66\x6f\x72\143\145"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function term_update($Hv, $rH, $zo, $wM = "\x49\104")
{
if (!("\164\x61\x67" === $zo)) {
goto Bc;
}
$zo = "\x70\x6f\x73\x74\137\164\x61\147";
Bc:
$u1 = array();
foreach ($rH as $Ac => $mT) {
if (!("\x77\x70\137\165\160\144\x61\x74\x65\x5f\164\x65\x72\x6d" === $mT["\x6d\x65\164\150\157\144\137\x6d\x6f\x64\151\146\x79"])) {
goto Ou;
}
$u1[$Ac] = $mT["\x76\141\154\x75\x65"];
unset($rH[$Ac]);
Ou:
Nh:
}
AI:
$sa = wp_update_term($Hv, $zo, $u1);
if (is_wp_error($sa)) {
goto iH;
}
$Hv = $sa["{$wM}"];
$Hn = $this->update_wp_meta($rH, $Hv, "\164\145\x72\x6d");
$v1 = $Hn["\163\x75\x63\x63\x65\163\163"];
$errors = $Hn["\145\x72\162\157\162\x73"];
do_action($this->option_prefix . "\163\x65\x74\137\155\157\x72\145\137\x74\x65\x72\x6d\x5f\x64\141\x74\141", $Hv, $rH, "\x75\x70\144\x61\164\145");
goto gc;
iH:
$v1 = false;
$errors = $sa;
gc:
if (is_wp_error($sa)) {
goto BC;
}
$v1 = true;
$errors = array();
goto Zt;
BC:
$v1 = false;
$errors = $sa;
Zt:
$FH = array("\144\141\164\141" => array($wM => $Hv, "\163\x75\143\143\145\x73\163" => $v1), "\145\162\x72\x6f\x72\163" => $errors);
return $FH;
}
private function comment_upsert($Ac, $mT, $El, $rH, $wM = "\143\157\x6d\155\145\156\164\x5f\111\x44", $yA = false, $eC = false)
{
$uP = $El["\x6d\x65\x74\150\157\144\137\155\x61\x74\143\150"];
if (!("\147\145\x74\137\143\157\x6d\155\x65\156\x74" === $uP)) {
goto aW;
}
$uP = "\147\145\x74\137\x63\x6f\155\155\145\x6e\x74\x73";
aW:
if ('' !== $uP) {
goto JL;
}
$rH[$Ac] = array("\x76\141\154\165\x65" => $mT, "\155\145\x74\150\157\144\x5f\155\x6f\144\151\146\x79" => $El["\155\x65\164\150\157\x64\137\155\x6f\144\x69\x66\171"], "\155\145\164\x68\x6f\144\137\162\x65\141\144" => $El["\155\x65\x74\150\157\x64\x5f\162\145\x61\x64"]);
if (!isset($rH["\x63\x6f\x6d\x6d\145\156\164\x5f\141\165\x74\x68\x6f\162"]["\x76\141\154\165\x65"])) {
goto Xt;
}
$tl = $rH["\x63\x6f\155\155\145\x6e\x74\137\x61\165\x74\x68\x6f\x72"]["\166\141\x6c\x75\145"];
Xt:
if (!isset($rH["\x63\x6f\155\x6d\145\x6e\x74\x5f\x64\x61\x74\145"]["\x76\141\x6c\x75\145"])) {
goto lC;
}
$c8 = $rH["\143\157\x6d\x6d\x65\x6e\x74\x5f\144\x61\x74\x65"]["\x76\141\x6c\x75\145"];
lC:
if (isset($rH["\x74\151\155\x65\x7a\157\156\x65"]["\x76\141\154\165\x65"])) {
goto IK;
}
$cp = "\142\x6c\157\147";
goto SS;
IK:
$cp = $rH["\164\151\x6d\145\172\x6f\x6e\145"]["\x76\141\154\x75\x65"];
SS:
$vq = comment_exists($tl, $c8, $cp);
if (null === $vq && false === $eC) {
goto bs;
}
if (true === $eC) {
goto mC;
}
$cz = $vq;
goto H4;
bs:
$FH = $this->comment_create($rH, $wM);
return $FH;
goto H4;
mC:
return $vq;
H4:
goto GK;
JL:
if (class_exists($uP)) {
goto Aj;
}
$BN = array();
if ("\143\157\155\155\x65\x6e\x74\x5f\141\x75\x74\150\x6f\x72" === $Ac) {
goto VP;
}
$Ac = str_replace("\x63\157\155\155\x65\x6e\x74\x5f", '', $Ac);
$BN[$Ac] = $mT;
goto MG;
VP:
$BN["\141\x75\x74\150\x6f\162\x5f\137\x69\x6e"] = array($mT);
MG:
$va = $uP($BN);
goto xe;
Aj:
$u1 = array("\x6d\145\x74\141\x5f\x71\x75\145\162\171" => array(array("\153\145\x79" => $Ac, "\x76\141\x6c\x75\x65" => $mT)));
$De = new $uP($u1);
$va = $De->get_comments();
if (empty($va)) {
goto k7;
}
$c9 = $Gh[0];
k7:
xe:
if (1 === count($va) && isset($va) && isset($va[0]->{$wM})) {
goto i1;
}
if (count($va) > 1) {
goto Ws;
}
if (false === $eC) {
goto YJ;
}
return null;
goto mj;
i1:
$c9 = $va[0];
$cz = $c9->{$wM};
if (!(true === $eC)) {
goto Ho;
}
return $cz;
Ho:
if (isset($El["\155\145\164\x68\x6f\144\137\165\160\x64\141\164\145"])) {
goto dH;
}
$uP = $El["\155\x65\x74\x68\x6f\144\x5f\x6d\157\x64\x69\x66\171"];
goto hD;
dH:
$uP = $El["\x6d\x65\164\x68\x6f\x64\x5f\x75\x70\144\141\x74\x65"];
hD:
$rH[$Ac] = array("\x76\141\x6c\165\145" => $mT, "\155\x65\x74\150\157\144\137\x6d\x6f\144\x69\x66\171" => $uP, "\x6d\145\164\150\157\x64\137\162\x65\x61\x64" => $El["\x6d\145\164\150\157\144\137\x72\x65\141\144"]);
goto mj;
Ws:
$CG = "\x65\162\162\157\x72";
if (isset($this->logging)) {
goto Oz;
}
if (class_exists("\117\142\152\145\143\x74\x5f\x53\x79\156\143\x5f\x53\x66\x5f\114\x6f\147\147\x69\156\x67")) {
goto Od;
}
goto cV;
Oz:
$tR = $this->logging;
goto cV;
Od:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
cV:
$tR->setup(sprintf(esc_html__("\x25\61\x24\x73\x3a\x20\103\x6f\155\x6d\145\156\x74\163\x3a\40\164\150\x65\x72\145\40\141\x72\145\40\x25\x32\44\x73\x20\143\x6f\155\x6d\x65\156\164\x20\155\x61\x74\x63\x68\x65\163\x20\x66\x6f\162\x20\164\150\x65\x20\x53\x61\154\145\x73\146\x6f\x72\x63\x65\40\x6b\x65\171\40\45\x33\x24\163\40\x77\x69\164\150\40\164\150\x65\40\166\141\x6c\165\145\x20\x6f\x66\40\x25\x34\x24\x73\x2e\x20\x48\145\162\x65\x20\164\150\145\x79\x20\x61\162\x65\x3a\x20\45\x35\x24\x73", "\157\x62\x6a\145\143\x74\x2d\163\171\x6e\143\55\146\157\162\55\163\x61\154\x65\163\x66\x6f\x72\x63\x65"), ucfirst(esc_attr($CG)), absint(count($va)), esc_html($Ac), esc_html($mT), esc_html(var_export($va))), '', 0, 0, $CG);
goto mj;
YJ:
if (isset($El["\155\145\x74\150\x6f\x64\137\143\162\x65\x61\x74\x65"])) {
goto A0;
}
$uP = $El["\155\x65\164\x68\x6f\144\137\155\x6f\144\151\x66\171"];
goto UQ;
A0:
$uP = $El["\155\x65\x74\150\157\x64\137\143\x72\145\141\x74\145"];
UQ:
$rH[$Ac] = array("\166\141\154\165\145" => $mT, "\155\145\164\150\157\x64\137\x6d\157\144\x69\146\x79" => $uP, "\x6d\145\164\150\x6f\x64\x5f\162\145\x61\x64" => $El["\155\145\164\x68\x6f\144\137\x72\x65\141\x64"]);
$FH = $this->comment_create($rH, $wM);
return $FH;
mj:
GK:
if (!isset($cz)) {
goto qb;
}
foreach ($rH as $Ac => $mT) {
$rH[$Ac]["\155\x65\x74\x68\157\144\x5f\x6d\x6f\144\151\x66\x79"] = $El["\155\x65\164\150\157\x64\137\x75\x70\x64\141\164\x65"];
sF:
}
FJ:
$FH = $this->comment_update($cz, $rH, $wM);
return $FH;
qb:
if (isset($this->logging)) {
goto m6;
}
if (class_exists("\117\x62\x6a\145\x63\x74\x5f\123\x79\x6e\x63\137\x53\146\137\x4c\157\147\147\x69\156\147")) {
goto XU;
}
goto Q0;
m6:
$tR = $this->logging;
goto Q0;
XU:
$tR = new Object_Sync_Sf_Logging($this->wpdb, $this->version);
Q0:
$CG = "\145\162\x72\157\162";
$el = sprintf(esc_html__("\45\x31\44\163\72\x20\103\x6f\155\155\x65\x6e\x74\163\x3a\x20\124\162\x69\145\x64\x20\164\157\40\162\x75\x6e\x20\143\x6f\x6d\155\x65\x6e\x74\137\165\160\x73\145\162\x74\54\x20\141\x6e\x64\40\x65\x6e\x64\x65\144\x20\x75\x70\40\167\151\x74\x68\x6f\x75\164\x20\141\x20\x63\157\155\x6d\x65\156\x74\x20\x69\144", "\x6f\142\x6a\x65\143\164\55\163\x79\x6e\x63\x2d\x66\157\x72\x2d\163\x61\154\x65\163\x66\157\x72\x63\145"), ucfirst(esc_attr($CG)));
$tR->setup($el, '', 0, 0, $CG);
}
private function comment_update($cz, $rH, $wM = "\x63\x6f\x6d\x6d\145\156\x74\x5f\x49\x44")
{
$tv = array();
$tv[$wM] = $cz;
foreach ($rH as $Ac => $mT) {
if (!("\167\x70\137\x75\x70\x64\x61\x74\145\137\x63\157\155\x6d\x65\156\x74" === $mT["\155\145\164\150\x6f\144\x5f\155\157\144\151\x66\x79"])) {
goto MJ;
}
$tv[$Ac] = $mT["\166\x61\154\165\x65"];
unset($rH[$Ac]);
MJ:
Ls:
}
zQ:
$B8 = wp_update_comment($tv);
if (0 === $B8) {
goto gX;
}
$Hn = $this->update_wp_meta($rH, $cz, "\143\x6f\155\x6d\x65\156\164");
$v1 = $Hn["\x73\165\x63\x63\145\163\163"];
$errors = $Hn["\x65\x72\162\x6f\x72\163"];
do_action($this->option_prefix . "\x73\145\x74\x5f\x6d\x6f\162\x65\x5f\x63\x6f\155\155\x65\156\164\x5f\x64\141\164\x61", $cz, $rH, "\x75\160\x64\x61\164\145");
goto aN;
gX:
$v1 = false;
$errors = $B8;
aN:
if (is_wp_error($B8)) {
goto uD;
}
$v1 = true;
$errors = array();
goto Wj;
uD:
$v1 = false;
$errors = $B8;
Wj:
$FH = array("\x64\141\x74\141" => array($wM => $cz, "\x73\x75\x63\143\145\x73\x73" => $v1), "\x65\162\x72\157\162\163" => $errors);
return $FH;
}
public function object_update($J5, $vv, $rH, $U2 = array())
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["\x69\144\137\x66\x69\x65\154\x64"];
switch ($J5) {
case "\165\x73\145\x72":
$FH = $this->user_update($vv, $rH, $wM);
goto T9;
case "\160\157\x73\x74":
$FH = $this->post_update($vv, $rH, $wM);
goto T9;
case "\x61\164\164\x61\143\150\155\145\156\x74":
$FH = $this->attachment_update($vv, $rH, $wM);
goto T9;
case "\x63\141\164\145\147\157\162\x79":
case "\164\141\x67":
case "\160\x6f\163\x74\137\x74\x61\x67":
$FH = $this->term_update($vv, $rH, $J5, $wM);
goto T9;
case "\143\157\155\155\145\156\164":
$FH = $this->comment_update($vv, $rH, $wM);
goto T9;
default:
if (!has_filter($this->option_prefix . "\165\x70\x64\141\164\145\137\x63\165\163\x74\x6f\155\x5f\x77\157\x72\144\x70\162\145\163\163\137\x69\164\145\155")) {
goto x2;
}
$FH = apply_filters($this->option_prefix . "\165\x70\144\141\x74\x65\x5f\x63\165\163\164\157\155\x5f\x77\157\162\144\x70\162\x65\x73\x73\x5f\x69\x74\145\155", array("\151\x64" => $vv, "\x70\x61\162\141\155\x73" => $rH, "\156\141\155\x65" => $J5, "\151\144\137\146\151\145\154\144" => $wM));
goto VM;
x2:
$FH = $this->post_update($vv, $rH, $wM, $J5);
VM:
goto T9;
}
Eb:
T9:
if (!(isset($FH["\145\x72\x72\x6f\x72\163"]) && !empty($FH["\145\x72\162\157\x72\x73"]))) {
goto os;
}
$CG = "\145\x72\x72\157\x72";
if (!isset($U2["\163\x61\x6c\x65\x73\x66\x6f\162\143\145\137\x69\144"])) {
goto Ll;
}
$el = sprintf(esc_html__("\45\61\x24\x73\x3a\x20\127\157\x72\x64\x50\162\145\x73\x73\40\x75\x70\144\141\x74\x65\40\146\157\162\x20\x25\62\44\x73\40\x49\x44\40\x25\63\x24\163\x20\x66\162\x6f\155\40\x53\x61\154\x65\163\146\157\x72\x63\145\40\x72\x65\x63\157\x72\144\x20\45\64\44\163\x20\167\141\x73\x20\165\156\x73\x75\143\143\145\163\163\146\165\154\40\x77\151\x74\150\x20\x74\150\x65\163\145\40\x65\162\162\x6f\x72\x73\72", "\x6f\142\x6a\145\x63\x74\x2d\x73\x79\156\143\55\146\x6f\x72\x2d\163\x61\154\145\x73\146\157\x72\143\145"), ucfirst(esc_attr($CG)), esc_attr($J5), esc_attr($vv), esc_attr($U2["\163\x61\x6c\x65\163\146\x6f\162\x63\x65\x5f\x69\x64"]));
goto PP;
Ll:
$el = sprintf(esc_html__("\x25\61\x24\x73\x3a\40\x57\157\162\144\120\162\145\163\x73\x20\165\x70\144\x61\164\145\x20\146\157\x72\x20\45\62\44\x73\40\111\x44\40\x25\63\x24\x73\40\167\x61\163\40\165\156\163\x75\143\143\x65\163\x73\146\165\154\40\167\x69\164\x68\x20\164\x68\145\163\x65\40\145\x72\x72\x6f\x72\163\72", "\x6f\x62\x6a\145\x63\x74\x2d\x73\x79\156\143\x2d\146\x6f\162\x2d\x73\141\x6c\145\163\x66\x6f\162\143\145"), ucfirst(esc_attr($CG)), esc_attr($J5), esc_attr($vv));
PP:
os:
return $FH;
}
public function object_delete($J5, $vv)
{
$J0 = $this->get_wordpress_table_structure($J5);
$wM = $J0["\151\x64\137\x66\151\145\154\144"];
switch ($J5) {
case "\165\163\145\x72":
$v1 = $this->user_delete($vv);
goto ed;
case "\x70\157\163\x74":
$v1 = $this->post_delete($vv);
goto ed;
case "\x61\x74\164\141\143\x68\x6d\x65\156\x74":
$v1 = $this->attachment_delete($vv);
goto ed;
case "\143\x61\x74\145\147\157\162\x79":
case "\x74\141\147":
case "\160\157\163\164\137\164\x61\x67":
$v1 = $this->term_delete($vv, $J5);
goto ed;
case "\143\x6f\155\x6d\145\x6e\164":
$v1 = $this->comment_delete($vv);
goto ed;
default:
if (!has_filter($this->option_prefix . "\144\x65\154\x65\x74\x65\137\143\165\x73\x74\x6f\x6d\x5f\167\x6f\x72\x64\x70\x72\x65\x73\163\x5f\x69\164\x65\155")) {
goto iI;
}
$v1 = apply_filters($this->option_prefix . "\x64\145\154\x65\164\x65\137\x63\x75\x73\164\157\x6d\137\167\x6f\x72\x64\160\162\145\163\163\x5f\x69\164\x65\155", array("\151\144" => $vv, "\x6e\141\x6d\x65" => $J5));
goto Im;
iI:
$v1 = $this->post_delete($vv);
Im:
$v1 = $this->post_delete($vv);
goto ed;
}
vX:
ed:
$FH = array("\x64\x61\x74\141" => array("\163\165\143\x63\145\x73\x73" => $v1), "\x65\x72\x72\x6f\x72\x73" => array());
return $FH;
}
private function user_delete($vv, $R9 = null)
{
require_once ABSPATH . "\167\160\55\x61\x64\155\x69\156\x2f\151\x6e\x63\154\165\144\x65\163\x2f\165\163\x65\x72\x2e\x70\x68\x70";
$FH = wp_delete_user($vv, $R9);
return $FH;
}
private function post_delete($vv, $qP = false)
{
$FH = wp_delete_post($vv, $qP);
return $FH;
}
private function attachment_delete($vv, $qP = false)
{
$FH = wp_delete_attachment($vv, $qP);
return $FH;
}
private function term_delete($Hv, $zo)
{
if (!("\x74\x61\x67" === $zo)) {
goto JQ;
}
$zo = "\160\x6f\x73\164\137\x74\141\147";
JQ:
$FH = wp_delete_term($Hv, $zo);
return $FH;
}
private function comment_delete($vv, $qP = false)
{
$FH = wp_delete_comment($vv, $qP);
return $FH;
}
private function append_tec_event_dates($UZ, $mL, $tv)
{
if (!(("\163\x74\x61\162\164" === $mL || "\x65\x6e\x64" === $mL) && class_exists("\x54\162\151\x62\x65\137\x5f\x44\x61\x74\145\137\x55\164\151\154\163"))) {
goto dK;
}
$f1 = array();
$JF = ucfirst($mL);
$ZB = strtotime($UZ);
$f1["\105\166\145\x6e\164" . $JF . "\104\141\164\145"] = $ZB;
$f1["\x45\x76\145\156\164" . $JF . "\x48\x6f\x75\x72"] = gmdate(Tribe__Date_Utils::HOURFORMAT, $ZB);
$f1["\105\166\x65\x6e\x74" . $JF . "\x4d\x69\156\x75\164\x65"] = gmdate(Tribe__Date_Utils::MINUTEFORMAT, $ZB);
$f1["\105\166\145\x6e\164" . $JF . "\115\x65\162\x69\144\x69\141\156"] = gmdate(Tribe__Date_Utils::MERIDIANFORMAT, $ZB);
$tv = $tv + $f1;
dK:
return $tv;
}
}
Function Calls
None |
Stats
MD5 | 6bbd5e3c021ef7222f659c74f94109c6 |
Eval Count | 0 |
Decode Time | 93 ms |