This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// License: GPLv2+ | |
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
ServerSideRender = wp.components.ServerSideRender, | |
TextControl = wp.components.TextControl, | |
InspectorControls = wp.editor.InspectorControls; | |
/* | |
* Here's where we register the block in JavaScript. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes the classic editor actions links. | |
*/ | |
add_action( 'admin_init', function() { | |
// For hierarchical post types. | |
add_filter( 'page_row_actions', 'gutenberg_remove_classic_editor_links', 10, 2 ); | |
// For non-hierarchical post types. | |
add_filter( 'post_row_actions', 'gutenberg_remove_classic_editor_links', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (m) { | |
/* | |
* PHP => moment.js | |
* Will take a php date format and convert it into a JS format for moment | |
* http://www.php.net/manual/en/function.date.php | |
* http://momentjs.com/docs/#/displaying/format/ | |
*/ | |
var formatMap = { | |
d: 'DD', | |
D: 'ddd', |