Skip to content

Conversation

lexuanbao161096
Copy link
Contributor

No description provided.

Copy link
Contributor

@tanftw tanftw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A mới check phần này, block editor mới sử dụng apiFetch() và wp api để làm autosave, phần JS mình vẫn dùng cách cũ là jquery và ajax nên nếu muốn phần này hoạt động, mình phải viết lại JS thôi.

image


$( document ).ajaxSend( function ( event, xhr, settings ) {
if ( ! Array.isArray( settings.data ) || -1 === settings.data.indexOf( 'wp_autosave' ) ) {
if ( ( typeof settings.data !== 'string' ) || -1 === settings.data.indexOf( 'wp_autosave' ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiện tại thì WP dùng apiFetch() để gửi dữ liệu autosave nên phần này không chạy được. E thử dùng cách khác xem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants