| File was renamed from assets/js/dash/ContentManager.js |
| | |
| | | }); |
| | | |
| | | const operation = { |
| | | user: jvbSettings.currentUser, |
| | | user: window.auth.getUser(), |
| | | type: 'content_update', |
| | | data: { |
| | | posts: posts |
| | |
| | | params.set('type', this.config.content); |
| | | params.set('page', this.queue[status].page); |
| | | params.set('filters', JSON.stringify(this.state.filters)); |
| | | params.set('user', jvbSettings.currentUser); |
| | | params.set('user', window.auth.getUser()); |
| | | |
| | | if (reset) { |
| | | this.queue[status].page = 1; |
| | |
| | | method: 'GET', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | 'X-WP-Nonce': jvbSettings.nonce, |
| | | 'action_nonce': jvbSettings.dash, |
| | | 'X-WP-Nonce': window.auth.getNonce(), |
| | | 'action_nonce': window.auth.getNonce('dash'), |
| | | }, |
| | | }, |
| | | { |
| | | context: jvbSettings.currentUser+'-'+this.config.content, |
| | | context: window.auth.getUser()+'-'+this.config.content, |
| | | forceRefresh: false, |
| | | } |
| | | ); |
| | |
| | | // method: 'GET', |
| | | // headers: { |
| | | // 'Content-Type': 'application/json', |
| | | // 'X-WP-Nonce': jvbSettings.nonce, |
| | | // 'action_nonce': jvbSettings.dash, |
| | | // 'X-WP-Nonce': window.auth.getNonce(), |
| | | // 'action_nonce': window.auth.getNonce('dash'), |
| | | // } |
| | | // }); |
| | | // const data = await response.json(); |
| | |
| | | }); |
| | | submit.taxonomies = taxonomies; |
| | | for(let [key, value] of Object.entries(submit)){ |
| | | if(value === '' || window.isEmptyObject(value)){ |
| | | if(value === '' || Object.keys(value).length === 0){ |
| | | delete submit[key]; |
| | | } |
| | | } |