Skip to content

Instantly share code, notes, and snippets.

@RatzeR
RatzeR / CookieLayer.css
Created February 1, 2017 10:49
Cookie Layer
.m-cookie-layer {
box-sizing: border-box;
background: black;
color: white;
padding: 20px 40px 20px 0;
display: none;
position: fixed;
z-index: 1000;
bottom: 0;
width: 100%;
@RatzeR
RatzeR / edit.js
Created January 2, 2021 14:32
Wordpress - Gutenberg: Get all PostTypes of your installation
export default withSelect((select, props) => {
const { attributes } = props;
const { selectedPostType } = attributes;
let postTypesArray = [];
const getPostTypes = select("core").getPostTypes();
// Gets all PostTypes and add's the name and the slug of each PostType to an array
if (getPostTypes != null) {
getPostTypes.map((type) => {