Filter Dropdowns (Extra Tablenav)
Source: Custom List Table Columns – Make WordPress Documentation
Filter Dropdowns (Extra Tablenav)
Source: Custom List Table Columns – Make WordPress Documentation
New embeds have landed and a lot of things have changed!
This is the third part of a WordPress Gutenberg Blocks series. You can see Part 1 and part 2. The finished repo for this tutorial is located here. We’ve created a simple block that allows a user to edit an h2 element in a truly WYSIWYG style. We’ve talked about how WordPress Gutenberg does attributes and how […]
Source: WordPress Gutenberg Blocks: Setting up and enqueueing CSS in the editor and the view – jschof
Lance Cleveland
Source: Adding Screen Options To WordPress Admin Pages – Lance Cleveland
Many of the built-in WordPress admin pages have a Screen Options drop-down tab on the top right of the page. This is used to set how many items are shown in the default WordPress tables, such as… Read More
Source: Adding Screen Options To WordPress Admin Pages – Lance Cleveland
I am trying to implement WP_List_Table for my plugin. I have gone through this tutorial and using its sample plugin. I have installed this plugin and just changed table name and done slightly
Source: How to implement WP_List_Table? WP_List_Table giving array instead of a value in listing table
http://lance.bio/2017/06/15/adding-screen-options-to-wordpress-admin-pages/
/gutenberg/packages/edit-post/build/utils/meta-boxes.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMetaBoxContainer = void 0;
/**
* Function returning the current Meta Boxes DOM Node in the editor
* whether the meta box area is opened or not.
* If the MetaBox Area is visible returns it, and returns the original container instead.
*
* @param {string} location Meta Box location.
* @return {string} HTML content.
*/
var getMetaBoxContainer = function getMetaBoxContainer(location) {
var area = document.querySelector(".edit-post-meta-boxes-area.is-".concat(location, " .metabox-location-").concat(location));
if (area) {
return area;
}
return document.querySelector('#metaboxes .metabox-location-' + location);
};
exports.getMetaBoxContainer = getMetaBoxContainer;
//# sourceMappingURL=meta-boxes.js.map
exports.getActiveMetaBoxLocations = getActiveMetaBoxLocations;
function isMetaBoxLocationVisible(state, location) {
return isMetaBoxLocationActive(state, location) && (0, _lodash.some)(getMetaBoxesPerLocation(state, location), function (_ref) {
var id = _ref.id;
return isEditorPanelEnabled(state, "meta-box-".concat(id));
});
}
/**
* Returns true if there is an active meta box in the given location, or false
* otherwise.
*
* @param {Object} state Post editor state.
* @param {string} location Meta box location to test.
*
* @return {boolean} Whether the meta box location is active.
*/
function isMetaBoxLocationActive(state, location) {
var metaBoxes = getMetaBoxesPerLocation(state, location);
return !!metaBoxes && metaBoxes.length !== 0;
}
/**
* Returns the list of all the available meta boxes for a given location.
*
* @param {Object} state Global application state.
* @param {string} location Meta box location to test.
*
* @return {?Array} List of meta boxes.
*/
function getMetaBoxesPerLocation(state, location) {
return state.metaBoxes.locations[location];
}
/**
* Returns the list of all the available meta boxes.
*
* @param {Object} state Global application state.
*
* @return {Array} List of meta boxes.
*/
var getAllMetaBoxes = (0, _rememo.default)(function (state) {
return (0, _lodash.flatten)((0, _lodash.values)(state.metaBoxes.locations));
}, function (state) {
return [state.metaBoxes.locations];
});
/**
* Returns true if the post is using Meta Boxes
*
* @param {Object} state Global application state
*
* @return {boolean} Whether there are metaboxes or not.
*/
exports.getAllMetaBoxes = getAllMetaBoxes;
function hasMetaBoxes(state) {
return getActiveMetaBoxLocations(state).length > 0;
}
/**
* Returns true if the Meta Boxes are being saved.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the metaboxes are being saved.
*/
function isSavingMetaBoxes(state) {
return state.metaBoxes.isSaving;
}
/**
* Reducer keeping track of the meta boxes isSaving state.
* A "true" value means the meta boxes saving request is in-flight.
*
*
* @param {boolean} state Previous state.
* @param {Object} action Action Object.
*
* @return {Object} Updated state.
*/
export function isSavingMetaBoxes( state = false, action ) {
switch ( action.type ) {
case 'REQUEST_META_BOX_UPDATES':
return true;
case 'META_BOX_UPDATES_SUCCESS':
return false;
default:
return state;
}
}
Render a shortcode or deliver a block.