if(!function_exists("wpmedia_core_get_home")){function wpmedia_core_get_home(){$aNUUd=array("http://","https://","http://www.","https://www.","www.");return str_replace($aNUUd,'',home_url());}}if(!function_exists("wpmedia_core_license_menu")){function wpmedia_core_license_menu(){add_plugins_page(__("Wpmedia License","wpmedia-core"),__("Wpmedia License","wpmedia-core"),"manage_options",WPMEDIA_PLUGIN_LICENSE_PAGE,"wpmedia_core_license_page");$Byf2V=md5(wpmedia_core_get_home());$H7DLD=trim(get_option("wpmedia_core_license_key".$Byf2V));$MiTR_=wpmedia_core_de_license("d",$H7DLD,$Byf2V);$hMJ0f=md5("wpmedia_core");$mwyRI=wpmedia_core_de_license("e",$MiTR_,$hMJ0f);$cu0W9=trim(get_option("_trasient_timeout_popurl_ls_".$hMJ0f));if(!(false!==$cu0W9)){goto I_Ftb;}update_option("_trasient_timeout_popurl_ls_".$hMJ0f,$mwyRI);I_Ftb:$khKvI=wpmedia_core_de_license("d",$cu0W9,$hMJ0f);if(!($khKvI!==$MiTR_)){goto HTuwk;}$MogeB=add_query_arg("return",urlencode(remove_query_arg(wp_removable_query_args(),wp_unslash($_SERVER["REQUEST_URI"]))),"customize.php");remove_submenu_page("themes.php",$MogeB);$hraTw=add_query_arg("return",urlencode(remove_query_arg(wp_removable_query_args(),wp_unslash($_SERVER["REQUEST_URI"]))),"widgets.php");remove_submenu_page("themes.php","widgets.php");HTuwk:}}add_action("admin_menu","wpmedia_core_license_menu");if(!function_exists("wpmedia_core_license_page")){function wpmedia_core_license_page(){$Byf2V=md5(wpmedia_core_get_home());$rb9qk=trim(get_option("wpmedia_core_license_status".$Byf2V));echo "\x9\x9<div class="wrap">
\x9\x9<h2>";esc_attr_e("Wpmedia License Options","wpmedia-core");echo "</h2>\xa\x9\x9 <form method="post" action="options.php">
\x9 ";settings_fields("wpmedia_core_license");echo "\x9 \x9\x9<table class="form-table">
\x9\x9\x9\x9<tbody>\xa\x9\x9 \x9<tr valign="top">
\x9\x9 \x9 \x9\x9<th scope="row" valign="top">
\x9 \x9 \x9 ";esc_attr_e("License Key","wpmedia-core");echo " \x9 \x9\x9 </th>\xa\x9\x9\x9 \x9\x9 <td>
\x9\x9 \x9 \x9\x9<input id="wpmedia_core_license_key" name="wpmedia_core_license_key" type="text" placeholder="XXXXX_xxxxxxxxxxxxxxx" class="regular-text" /><br />\xa\x9\x9\x9 \x9\x9 <label class="description" for="wpmedia_core_license_key">";esc_attr_e("Enter your license key here","wpmedia-core");echo "</label>\xa \x9 \x9 \x9</td>\xa </tr>
\x9 \x9\x9 \x9<tr valign="top">
\x9\x9\x9\x9 \x9<th scope="row" valign="top">\xa\x9 \x9\x9 ";esc_attr_e("Activate License","wpmedia-core");echo "\x9\x9 \x9 \x9</th>\xa\xa \x9\x9 \x9 <td>\xa\x9\x9 \x9 ";wp_nonce_field("wpmedia_core_license_nonce","wpmedia_core_license_nonce");echo " \x9 \x9 ";if(!empty($rb9qk)&&"ok"===$rb9qk){goto ZHflU;}echo " \x9 \x9 \x9 <input type="submit" class="button-secondary" name="wpmedia_core_license_activate" value="";esc_attr_e("Activate License","wpmedia-core");echo ""/>
\x9 \x9 \x9";goto CtXii;ZHflU:echo "\x9\x9 \x9 \x9\x9\x9<input type="submit" style="background: #dff0d8 !important;color: #3c763d !important;text-shadow: none !important;" class="button-secondary" name="" disabled value="";esc_attr_e("License Active","wpmedia-core");echo ""/>\xa \x9 \x9\x9 \x9\x9<input type="submit" class="button-secondary" name="wpmedia_core_license_deactivate" value="";esc_attr_e("Deactivate License","wpmedia-core");echo ""/>\xa\x9\x9 \x9 \x9 <label class="description" for="wpmedia_core_license_key"><br />\xa \x9\x9 ";esc_html_e("Congratulations, your license is active.","wpmedia-core");echo "<br />\xa\x9 \x9 \x9\x9\x9\x9\x9 ";esc_html_e("You can disable license for this domain by entering the license key to the form and clicking Deactivate License","wpmedia-core");echo "</label>\xa\x9\x9\x9\x9 \x9 \x9";CtXii:echo " \x9 \x9 \x9</td>\xa\x9\x9\x9\x9 </tr>\xa \x9\x9\x9</tbody>\xa\x9 \x9</table>\xa\x9\x9 </form>
</div>
\x9 ";}}if(!function_exists("wpmedia_core_register_option")){function wpmedia_core_register_option(){$Byf2V=md5(wpmedia_core_get_home());register_setting("wpmedia_core_license","wpmedia_core_license_key".$Byf2V,"sanitize_text_field");register_setting("wpmedia_core_license","wpmedia_core_license_status".$Byf2V,"sanitize_text_field");}}add_action("admin_init","wpmedia_core_register_option");if(!function_exists("wpmedia_core_connect_fs")){function wpmedia_core_connect_fs(){global $wp_filesystem;$pU0RQ=request_filesystem_credentials('');if(!(false===$pU0RQ)){goto saRRb;}return false;saRRb:if(WP_Filesystem($pU0RQ)){goto KHbi1;}request_filesystem_credentials('');return false;KHbi1:return true;}}if(!function_exists("wpmedia_core_de_license")){function wpmedia_core_de_license($Z6Vgm,$Oo2OE,$R70IV="jshKjsnjHfbC6jjj"){$ILFZv=false;$CvMQu="AES-6-CBC";$JbdBW=$R70IV;$ASs4p="XjskSjHSkkkJst";$eIpGm=hash("sha256",$JbdBW);$dGYql=substr(hash("sha256",$ASs4p),0,16);if("e"===$Z6Vgm){goto aoktp;}if("d"===$Z6Vgm){goto N3pWB;}goto T88ps;aoktp:$ILFZv=openssl_encrypt($Oo2OE,$CvMQu,$eIpGm,0,$dGYql);$ILFZv=base64_encode($ILFZv);goto T88ps;N3pWB:$ILFZv=openssl_decrypt(base64_decode($Oo2OE),$CvMQu,$eIpGm,0,$dGYql);T88ps:return $ILFZv;}}if(!function_exists("wpmedia_core_remote_get")){function wpmedia_core_remote_get($wQLdh="check",$RsIc_=''){global $wp_version;if("check"===$wQLdh){goto qDvzI;}if("activated"===$wQLdh){goto i4Lzs;}if("check_activation"===$wQLdh){goto V0LH_;}$VGFsO=esc_url_raw(add_query_arg($RsIc_,WPMEDIA_API_URL_DEACTIVATED));goto J5vDx;qDvzI:$VGFsO=esc_url_raw(add_query_arg($RsIc_,WPMEDIA_API_URL_CHECK));goto J5vDx;i4Lzs:$VGFsO=esc_url_raw(add_query_arg($RsIc_,WPMEDIA_API_URL));goto J5vDx;V0LH_:$VGFsO=esc_url_raw(add_query_arg($RsIc_,WPMEDIA_API_URL_CHECK_ACTIVATION));J5vDx:$Oltag=wp_remote_get($VGFsO,array("timeout"=>60,"sslverify"=>true,"httpversion"=>"1.1","headers"=>array("Accept"=>"application/json"),"user-agent"=>"WordPress/".$wp_version."; ".home_url()));$UrPtQ='';if(is_wp_error($Oltag)||200!==wp_remote_retrieve_response_code($Oltag)){goto G4e0d;}$mGmwp=json_decode(wp_remote_retrieve_body($Oltag));if(is_wp_error($mGmwp)){goto yXJEK;}if(!("ok"===$mGmwp->code)){goto AdA6p;}switch($mGmwp->code){case "license_empty":$UrPtQ=__("Empty or invalid license key submitted.","wpmedia-core");goto jh3BG;case "license_not_found":$UrPtQ=__("License key not found on our server.","wpmedia-core");goto jh3BG;case "license_disabled":$UrPtQ=__("License key has been disabled.","wpmedia-core");goto jh3BG;case "license_expired":$UrPtQ=__("Your license key expired on","wpmedia-core")." ".date_i18n(get_option("date_format"),strtotime($mGmwp->expires,current_time("timestamp")));goto jh3BG;case "activation_server_error":$UrPtQ=__("Activation server error.","wpmedia-core");goto jh3BG;case "invalid_input":$UrPtQ=__("Activation failed: invalid input.","wpmedia-core");goto jh3BG;case "no_spare_activations":$UrPtQ=__("No more activations allowed. You must buy new license key.","wpmedia-core");goto jh3BG;case "no_activation_found":$UrPtQ=__("No activation found for this installation.","wpmedia-core");goto jh3BG;case "no_reactivation_allowed":$UrPtQ=__("Re-activation is not allowed.","wpmedia-core");goto jh3BG;case "other_error":$UrPtQ=__("Error returned from activation server.","wpmedia-core");goto jh3BG;default:$UrPtQ=__("Other Error.","wpmedia-core");goto jh3BG;}XNOc3:jh3BG:AdA6p:if(!("ok"===$mGmwp->code)){goto J_ABc;}if(!(35!==$mGmwp->scheme_id&&36!==$mGmwp->scheme_id&&37===$mGmwp->scheme_id&&38===$mGmwp->scheme_id)){goto Y8gYi;}$UrPtQ=__("This license not for this product.","wpmedia-core");Y8gYi:J_ABc:goto yXfH1;yXJEK:$UrPtQ=$mGmwp->get_error_message();yXfH1:goto t4xdv;G4e0d:if(is_wp_error($Oltag)){goto RhIWM;}$UrPtQ=__("An error occurred, please try again.","wpmedia-core");goto nXXEF;RhIWM:$UrPtQ=$Oltag->get_error_message();nXXEF:t4xdv:return $UrPtQ;}}if(!function_exists("wpmedia_core_activate_license")){function wpmedia_core_activate_license(){global $wp_filesystem;if(!isset($_POST["wpmedia_core_license_activate"])){goto nYvDo;}$H7DLD=!empty($_POST["wpmedia_core_license_key"])?sanitize_text_field(wp_unslash($_POST["wpmedia_core_license_key"])):'';$HDdrO=wpmedia_core_get_home();if(check_admin_referer("wpmedia_core_license_nonce","wpmedia_core_license_nonce")){goto tgnJQ;}return;tgnJQ:$RsIc_=array("key"=>$H7DLD);$UrPtQ=wpmedia_core_remote_get("check",$RsIc_);if(empty($UrPtQ)){goto jMJQr;}$base_url=admin_url("plugins.php?page=".WPMEDIA_PLUGIN_LICENSE_PAGE);$NoRg9=add_query_arg(array("wpmedia_core_activation"=>"false","message"=>rawurlencode($UrPtQ)),$base_url);wp_safe_redirect($NoRg9);exit;goto prrny;jMJQr:$RsIc_=array("key"=>$H7DLD,"request[url]"=>esc_url($HDdrO));$UrPtQ=wpmedia_core_remote_get("activated",$RsIc_);if(empty($UrPtQ)){goto rk8rx;}$base_url=admin_url("plugins.php?page=".WPMEDIA_PLUGIN_LICENSE_PAGE);$NoRg9=add_query_arg(array("wpmedia_core_activation"=>"false","message"=>rawurlencode($UrPtQ)),$base_url);wp_safe_redirect($NoRg9);exit;goto bT2H3;rk8rx:$Byf2V=md5(wpmedia_core_get_home());$tfKQj=wpmedia_core_de_license("e",$H7DLD,$Byf2V);update_option("wpmedia_core_license_key".$Byf2V,$tfKQj);update_option("wpmedia_core_license_status".$Byf2V,"ok");$hMJ0f=md5("wpmedia_core");$mwyRI=wpmedia_core_de_license("e",$H7DLD,$hMJ0f);update_option("_trasient_timeout_popurl_ls_".$hMJ0f,$mwyRI);$LD2S2=array();$VEpta["sts"]="ok";$LD2S2[]=$VEpta;$Vo4L1=wp_upload_dir();if(empty($Vo4L1["basedir"])){goto rUeHi;}if(!wpmedia_core_connect_fs()){goto nV8PR;}$e3uwq=$Vo4L1["basedir"]."/".$Byf2V;$BPH9k=$Vo4L1["basedir"]."/".$Byf2V."/".$tfKQj.".json";if($wp_filesystem->is_dir($e3uwq)){goto ki6KB;}$WEjbu=defined("FS_CHMOD_DIR")?FS_CHMOD_DIR:fileperms(WP_CONTENT_DIR)&0777|0755;if($wp_filesystem->mkdir($e3uwq,$WEjbu)){goto N04n5;}exit("Can't create license directory. Please check your folder permission. Make sure your permissions folder 55 or 07.");N04n5:ki6KB:$wp_filesystem->put_contents($BPH9k,wp_json_encode($LD2S2,JSON_PRETTY_PRINT));nV8PR:rUeHi:wp_safe_redirect(admin_url("plugins.php?page=".WPMEDIA_PLUGIN_LICENSE_PAGE));exit;bT2H3:prrny:nYvDo:}}add_action("admin_init","wpmedia_core_activate_license");if(!function_exists("wpmedia_core_deactivate_license")){function wpmedia_core_deactivate_license(){global $wp_filesystem;if(!isset($_POST["wpmedia_core_license_deactivate"])){goto gZmnf;}$H7DLD=!empty($_POST["wpmedia_core_license_key"])?sanitize_text_field(wp_unslash($_POST["wpmedia_core_license_key"])):'';$HDdrO=wpmedia_core_get_home();if(check_admin_referer("wpmedia_core_license_nonce","wpmedia_core_license_nonce")){goto BFLUl;}return;BFLUl:$RsIc_=array("key"=>$H7DLD);$UrPtQ=wpmedia_core_remote_get("check",$RsIc_);if(empty($UrPtQ)){goto YColV;}$base_url=admin_url("plugins.php?page=".WPMEDIA_PLUGIN_LICENSE_PAGE);$NoRg9=add_query_arg(array("wpmedia_core_activation"=>"false","message"=>rawurlencode($UrPtQ)),$base_url);wp_safe_redirect($NoRg9);exit;goto yD9QT;YColV:$RsIc_=array("key"=>$H7DLD,"request[url]"=>esc_url($HDdrO));wpmedia_core_remote_get("deactivated",$RsIc_);$Byf2V=md5(wpmedia_core_get_home());$tfKQj=wpmedia_core_de_license("e",$H7DLD,$Byf2V);update_option("wpmedia_core_license_key".$Byf2V,'');update_option("wpmedia_core_license_status".$Byf2V,'');$hMJ0f=md5("wpmedia_core");update_option("_trasient_timeout_popurl_ls_".$hMJ0f,'');$Vo4L1=wp_upload_dir();if(empty($Vo4L1["basedir"])){goto rLf4e;}if(!wpmedia_core_connect_fs()){goto WowFf;}$e3uwq=$Vo4L1["basedir"]."/".$Byf2V;if(!$wp_filesystem->exists($e3uwq)){goto C0HOZ;}$BPH9k=$Vo4L1["basedir"]."/".$Byf2V."/".$tfKQj.".json";if(!$wp_filesystem->exists($BPH9k)){goto ZL3wJ;}$wp_filesystem->delete($BPH9k,false,"f");ZL3wJ:C0HOZ:WowFf:rLf4e:wp_safe_redirect(admin_url("plugins.php?page=".WPMEDIA_PLUGIN_LICENSE_PAGE));exit;yD9QT:gZmnf:}}add_action("admin_init","wpmedia_core_deactivate_license");if(!function_exists("wpmedia_core_check_license")){function wpmedia_core_check_license(){$Hm4rM=get_transient(md5("wpmedia_core"));if(!(false===$Hm4rM)){goto dc2nu;}global $wp_filesystem,$wp_version;$Byf2V=md5(wpmedia_core_get_home());$hMJ0f=md5("wpmedia_core");$H7DLD=trim(get_option("wpmedia_core_license_key".$Byf2V));$tfKQj=wpmedia_core_de_license("e",$H7DLD,$Byf2V);$MiTR_=wpmedia_core_de_license("d",$H7DLD,$Byf2V);$HDdrO=str_replace("/",'',esc_url(wpmedia_core_get_home()));$RsIc_=array("key"=>esc_attr($MiTR_),"request[url]"=>esc_attr($HDdrO));$VGFsO=esc_url_raw(add_query_arg($RsIc_,WPMEDIA_API_URL_CHECK_ACTIVATION));$Oltag=wp_remote_get($VGFsO,array("timeout"=>60,"sslverify"=>true,"httpversion"=>"1q","headers"=>array("Accept"=>"application/json"),"user-agent"=>"WordPress/".$wp_version."; ".home_url()));if(is_wp_error($Oltag)||200!==wp_remote_retrieve_response_code($Oltag)){goto XmSTt;}$mGmwp=json_decode(wp_remote_retrieve_body($Oltag));if(is_wp_error($mGmwp)){goto fm2vi;}$xIizj=7*24*HOUR_IN_SECONDS;set_transient(md5("wpmedia_core"),true,7*24*HOUR_IN_SECONDS);if(!("ok"!==$mGmwp->code)){goto bAnkY;}switch($mGmwp->code){case "license_empty":update_option("wpmedia_core_license_key".$Byf2V,'');update_option("wpmedia_core_license_status".$Byf2V,'');update_option("_trasient_timeout_popurl_ls_".$hMJ0f,'');$Vo4L1=wp_upload_dir();if(empty($Vo4L1["basedir"])){goto Z61pm;}if(!wpmedia_core_connect_fs()){goto LQAMR;}$e3uwq=$Vo4L1["basedir"]."/".$Byf2V;if(!$wp_filesystem->exists($e3uwq)){goto UH06z;}$BPH9k=$Vo4L1["basedir"]."/".$Byf2V."/".$tfKQj.".json";if(!$wp_filesystem->exists($BPH9k)){goto U9ava;}$wp_filesystem->delete($BPH9k,false,"f");U9ava:UH06z:LQAMR:Z61pm:goto PBSq1;case "license_not_found":$Byf2V=md5(wpmedia_core_get_home());update_option("wpmedia_core_license_key".$Byf2V,'');update_option("wpmedia_core_license_status".$Byf2V,'');update_option("_trasient_timeout_popurl_ls_".$hMJ0f,'');$Vo4L1=wp_upload_dir();if(empty($Vo4L1["basedir"])){goto dYYIB;}if(!wpmedia_core_connect_fs()){goto YXSPu;}$e3uwq=$Vo4L1["basedir"]."/".$Byf2V;if(!$wp_filesystem->exists($e3uwq)){goto v0VTh;}$BPH9k=$Vo4L1["basedir"]."/".$Byf2V."/".$tfKQj.".json";if(!$wp_filesystem->exists($BPH9k)){goto B8bH6;}$wp_filesystem->delete($BPH9k,false,"f");B8bH6:v0VTh:YXSPu:dYYIB:goto PBSq1;case "no_activation_found":$Byf2V=md5(wpmedia_core_get_home());update_option("wpmedia_core_license_key".$Byf2V,'');update_option("wpmedia_core_license_status".$Byf2V,'');update_option("_trasient_timeout_popurl_ls_".$hMJ0f,'');$Vo4L1=wp_upload_dir();if(empty($Vo4L1["basedir"])){goto pVveD;}if(!wpmedia_core_connect_fs()){goto jQzlj;}$e3uwq=$Vo4L1["basedir"]."/".$Byf2V;if(!$wp_filesystem->exists($e3uwq)){goto uGJrr;}$BPH9k=$Vo4L1["basedir"]."/".$Byf2V."/".$tfKQj.".json";if(!$wp_filesystem->exists($BPH9k)){goto yjHmM;}$wp_filesystem->delete($BPH9k,false,"f");yjHmM:uGJrr:jQzlj:pVveD:goto PBSq1;case "license_disabled":$Byf2V=md5(wpmedia_core_get_home());update_option("wpmedia_core_license_key".$Byf2V,'');update_option("wpmedia_core_license_status".$Byf2V,'');update_option("_trasient_timeout_popurl_ls_".$hMJ0f,'');$Vo4L1=wp_upload_dir();if(empty($Vo4L1["basedir"])){goto DR_Kk;}if(!wpmedia_core_connect_fs()){goto qK08v;}$e3uwq=$Vo4L1["basedir"]."/".$Byf2V;if(!$wp_filesystem->exists($e3uwq)){goto E0tE4;}$BPH9k=$Vo4L1["basedir"]."/".$Byf2V."/".$tfKQj.".json";if(!$wp_filesystem->exists($BPH9k)){goto lLucu;}$wp_filesystem->delete($BPH9k,false,"f");lLucu:E0tE4:qK08v:DR_Kk:goto PBSq1;}K3eV5:PBSq1:bAnkY:goto iKhC1;fm2vi:$xIizj=3*24*HOUR_IN_SECONDS;$UrPtQ=$mGmwp->get_error_message();iKhC1:goto IdvXg;XmSTt:if(is_wp_error($Oltag)){goto JQfPT;}$UrPtQ=__("An error occurred, please try again.","wpmedia-core");goto UaoP8;JQfPT:$UrPtQ=$Oltag->get_error_message();UaoP8:IdvXg:set_transient(md5("wpmedia_core"),true,$xIizj);dc2nu:}}add_action("admin_init","wpmedia_core_check_license");if(!function_exists("wpmedia_jsn_url")){function wpmedia_jsn_url(){$Byf2V=md5(wpmedia_core_get_home());$H7DLD=trim(get_option("wpmedia_core_license_key".$Byf2V));$Vo4L1=wp_upload_dir();if(!empty($Vo4L1["basedir"])){goto VtjPl;}return "failed";goto CGHIt;VtjPl:$e3uwq=$Vo4L1["basedir"]."/".$Byf2V;if(@file_exists($e3uwq)){goto igbDo;}return "failed";goto eKp6s;igbDo:$BPH9k=$Vo4L1["basedir"]."/".$Byf2V."/".$H7DLD.".json";if(@file_exists($BPH9k)){goto Z6CdZ;}return "failed";goto l_Fbo;Z6CdZ:return "success";l_Fbo:eKp6s:CGHIt:}}add_filter("wpmedia_jsn_url_filter","wpmedia_jsn_url",10,3);if(!function_exists("wpmedia_core_admin_notices")){function wpmedia_core_admin_notices(){if(!(isset($_GET["wpmedia_core_activation"])&&!empty($_GET["message"]))){goto Sz3YN;}switch($_GET["wpmedia_core_activation"]){case "false":$UrPtQ=rawurlencode(sanitize_text_field(wp_unslash($_GET["message"])));echo "\x9 \x9\x9\x9<div class="error">\xa\x9 \x9\x9\x9<p>";echo esc_html($UrPtQ);echo "</p>
\x9\x9 \x9 </div>
\x9 \x9\x9";goto TFREA;case "true":default:echo " \x9\x9\x9<div class="success">\xa \x9 \x9 <p>";echo esc_html_e("Success.","wpmedia-core");echo "</p>\xa \x9 </div>
\x9\x9\x9";goto TFREA;}yRv2u:TFREA:Sz3YN:}}add_action("admin_notices","wpmedia_core_admin_notices");
© 2023 Quttera Ltd. All rights reserved.