( function( wp ) { if ( ! wp ) { return; } wp.plugins.registerPlugin( 'classic-editor-plugin', { render: function() { var createElement = wp.element.createElement; var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem; var url = wp.url.addQueryArgs( document.location.href, { 'classic-editor': '', 'classic-editor__forget': '' } ); var linkText = lodash.get( window, [ 'classicEditorPluginL10n', 'linkText' ] ) || 'Switch to classic editor'; return createElement( PluginMoreMenuItem, { icon: 'editor-kitchensink', href: url, }, linkText ); }, } ); } )( window.wp );// import { __ } from '@wordpress/i18n' FULL OF BUGS! import { xssEscape } from 'xss-escape' export default function MediaLibrary() { return { manager: {}, init() { this.manager = wp.media.frames.file_frame = wp.media({ title: __('Select Images', 'metagallery'), multiple: true, library: { type: 'image' }, }) const viewsToRemove = this.manager.states.models.filter((view) => !['library'].includes(view.id)) this.manager.states.remove(viewsToRemove) this.manager.on('select', () => { const selection = this.manager.state().get('selection').toJSON() const images = selection .filter((image) => image.type === 'image') .map((image) => { return { _uid: parseInt(Date.now() + Math.floor(Math.random() * 1000000), 10), height: image.height, width: image.width, title: image.title, alt: xssEscape(image.alt), caption: image.caption, src: { main: image.sizes.full, thumbnail: image.sizes.thumbnail, }, WP: { id: image.id, }, } }) this.$component('current').addImages(images) }) }, } } Địa điểm ăn vặt | Ăn vặt no say Địa điểm ăn vặt | Ăn vặt no say

Địa điểm ăn vặt

Đồ ăn vặt ở Nha Trang, top 7 quán ăn vặt ngon, rẻ, chất lượng

Khi ăn vặt ở Nha Trang, bạn nhất định phải thử món bánh căn mực tại quán Cô Loan trên…

5 tháng ago

Top 5 địa điểm ăn vặt không thể bỏ qua khi đến Sài Gòn

Sài Gòn không chỉ biết đến là thành phố lớn, là trung tâm kinh tế mà còn được xem là…

7 tháng ago