This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2015-08-12 20:16:07 +02:00

25 lines
691 B
JavaScript

/* jshint strict:true */
/* global ajaxurl */
/* global wpseo_export_nonce */
jQuery( document ).ready( function( $ ) {
'use strict';
$( '#export-button' ).click( function() {
$.post( ajaxurl, {
action: 'wpseo_export',
_wpnonce: wpseo_export_nonce,
include_taxonomy: $( '#include_taxonomy_meta' ).is( ':checked' )
}, function( resp ) {
resp = JSON.parse( resp );
var dclass = 'error';
if ( resp.status === 'success' ) {
dclass = 'updated';
}
$( '#wpseo-title' ).append( '<div class="' + dclass + ' settings-error"><p><strong>' + resp.msg + '</strong></p></div>' );
}
);
event.preventDefault();
}
);
}
);