wp-seo-premium-custom-fields-plugin-350.min.js 1.94 KB
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";!function(){var a=function(){YoastSEO.app.registerPlugin("YoastCustomFieldsPlugin",{status:"loading"}),this.customFields={},this.updateCustomFields(),this.declareReady()};a.prototype.declareReady=function(){YoastSEO.app.pluginReady("YoastCustomFieldsPlugin"),YoastSEO.app.registerModification("content",this.addCustomFields.bind(this),"YoastCustomFieldsPlugin")},a.prototype.declareReloaded=function(){YoastSEO.app.pluginReloaded("YoastCustomFieldsPlugin")},a.prototype.addCustomFields=function(a){for(var b in this.customFields)a+=" ",a+=this.customFields[b];return a},a.prototype.updateCustomFields=function(){var a={};jQuery("#the-list > tr:visible").each(function(b,c){var d=jQuery("#"+c.id+"-key").val();YoastCustomFieldsPluginL10.custom_field_names.indexOf(d)!==-1&&(a[d]=jQuery("#"+c.id+"-value").val())}),this.customFields=a,this.declareReloaded(),this.bindCustomFields()},a.prototype.bindCustomFields=function(){var a=_.debounce(this.updateCustomFields.bind(this),500,!0);jQuery("#the-list .button + .update_meta").off("click.wpseoCustomFields").on("click.wpseoCustomFields",a),jQuery("#the-list").off("wpListDelEnd.wpseoCustomFields").on("wpListDelEnd.wpseoCustomFields",a),jQuery("#the-list").off("wpListAddEnd.wpseoCustomFields").on("wpListAddEnd.wpseoCustomFields",a),jQuery("#the-list textarea").off("input.wpseoCustomFields").on("input.wpseoCustomFields",a)},"undefined"!=typeof YoastSEO&&"undefined"!=typeof YoastSEO.app?new a:jQuery(window).on("YoastSEO:ready",function(){new a})}()},{}]},{},[1]);