Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/plugins/wp-user-profile-avatar/assets/js/admin-avatar.min.js
Назад
var AdminAvatar=(AdminAvatar=function(){return{init:function(){jQuery("#wp-user-profile-avatar-add").off("click").on("click",AdminAvatar.actions.chooseAvatar),jQuery("#wp-user-profile-avatar-remove").off("click").on("click",AdminAvatar.actions.removeAvatar),jQuery("#wp-user-profile-avatar-undo").off("click").on("click",AdminAvatar.actions.undoAvatar),jQuery("body").off("click","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap .nav-tab-wrapper a").on("click","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap .nav-tab-wrapper a",AdminAvatar.actions.showShortcodeAvatarTab),jQuery("body").off("change","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-link-to").on("change","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-link-to",AdminAvatar.actions.imageLinkTo),jQuery("body").off("click","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #user-avatar-form-btn").on("click","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #user-avatar-form-btn",AdminAvatar.actions.addUserAvatarShortcode),jQuery("body").off("click","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-upload-avatar #upload-avatar-form-btn").on("click","#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-upload-avatar #upload-avatar-form-btn",AdminAvatar.actions.addUploadAvatarShortcode),"undefined"!=typeof tinymce&&(tinymce.PluginManager.add("wp_user_profile_avatar_shortcodes",function(a,r){a.addButton("wp_user_profile_avatar_shortcodes",{title:wp_user_profile_avatar_admin_avatar.icon_title,classes:"thickbox",image:wp_user_profile_avatar_admin_avatar.default_avatar,icon:!1,onclick:function(){}})}),setTimeout(function(){jQuery(".mce-thickbox button").remove(),jQuery(".mce-thickbox").html('<a href="'+wp_user_profile_avatar_admin_avatar.thinkbox_ajax_url+'" class="thickbox mce-toolbar" title="'+wp_user_profile_avatar_admin_avatar.thinkbox_title+'"><img class="mce-ico" src="'+wp_user_profile_avatar_admin_avatar.default_avatar+'"></a>')},1500))},actions:{showShortcodeAvatarTab:function(a){jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap .admin-setting-left .settings-panel").hide();a=jQuery(a.target).attr("href");jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap .admin-setting-left "+a).show()},imageLinkTo:function(a){"custom"==jQuery(a.target).val()?jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-custom-link-to").attr("type","text"):jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-custom-link-to").attr("type","hidden")},addUserAvatarShortcode:function(a){var r=jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-user-id").val(),t=jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-size").val(),e=jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-alignment").val(),o=jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-link-to").val(),i=jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-custom-link-to").val(),_="";1==jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-open-new-window").prop("checked")&&(_=jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-open-new-window").val());o=""!=o&&"custom"!=o&&""==i?' link="'+o+'"':"",_="<p>[user_profile_avatar"+(""!=r?' user_id="'+r+'"':"")+(""!=t?' size="'+t+'"':"")+(""!=e?' align="'+e+'"':"")+(o=""!=i?' link="'+i+'"':o)+(""!=_?' target="'+_+'"':"")+"] "+jQuery("body").find("#TB_window #TB_ajaxContent .wp-user-profile-avatar-shortcode-wrap #settings-user-avatar #wp-image-caption").val()+" [/user_profile_avatar]</p>";tinymce.activeEditor.insertContent(_),console.log(_),jQuery("body").find("#TB_window #TB_title #TB_closeAjaxWindow #TB_closeWindowButton").trigger("click")},addUploadAvatarShortcode:function(a){tinymce.activeEditor.insertContent("<p>[user_profile_avatar_upload]</p>"),jQuery("body").find("#TB_window #TB_title #TB_closeAjaxWindow #TB_closeWindowButton").trigger("click")},chooseAvatar:function(a){var r=wp.media({library:{type:"image"},title:wp_user_profile_avatar_admin_avatar.media_box_title,multiple:!1}).on("select",function(){var a=r.state().get("selection").first().toJSON();jQuery("#wp-user-profile-avatar-preview img").attr("src",a.url),jQuery("#wp-user-profile-avatar-thumbnail img").attr("src",a.url),console.log(a),jQuery("#wpupaattachmentid").attr("value",a.id),jQuery("#wp_user_profile_avatar_radio").trigger("click"),jQuery("#wp-user-profile-avatar-undo-button").show()}).open()},removeAvatar:function(a){jQuery("#wp-user-profile-avatar-preview img").attr("src",wp_user_profile_avatar_admin_avatar.default_avatar),jQuery("#wp-user-profile-avatar-thumbnail img").attr("src",wp_user_profile_avatar_admin_avatar.default_avatar),jQuery("#wpupaattachmentid").attr("value",""),jQuery("#wpupa_url").attr("value",""),jQuery("#wp-user-profile-avatar-remove").hide()},undoAvatar:function(a){jQuery("#wp-user-profile-avatar-preview img").attr("src",wp_user_profile_avatar_admin_avatar.default_avatar),jQuery("#wp-user-profile-avatar-thumbnail img").attr("src",wp_user_profile_avatar_admin_avatar.default_avatar),jQuery("#wpupaattachmentid").attr("value",""),jQuery("#wp-user-profile-avatar-undo-button").hide()}}}})();jQuery(document).ready(function(a){AdminAvatar.init()});
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка