git init
or
/** | |
* STEP 1: Click on the first image to open the image lightbox carousel | |
*/ | |
/** | |
* STEP 2: Open Dev Tools Console. | |
* Copy and paste code below, replace the query variables if they changed | |
* This will download the images in webp and jpg |
<?php | |
/** | |
* Save the image on the server. | |
*/ | |
function save_image( $base64_img, $title ) { | |
// Upload dir. | |
$upload_dir = wp_upload_dir(); | |
$upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR; |
// ==UserScript== | |
// @name Convert post to Gutenberg | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Convert Wordpress classic posts to Gutenberg layout | |
// @author Micah Engle-Eshleman | |
// @include /^https:\/\/subdomain\.domain\.com\/wp-admin\/post.php\?post=\d+&action=edit/ | |
// @grant none | |
// ==/UserScript== |
import { useRef } from 'react'; | |
let uniqueId = 0; | |
const getUniqueId = () => uniqueId++; | |
export function useComponentId() { | |
const idRef = useRef(getUniqueId()); | |
return idRef.current; | |
} |
**/*.min.js | |
**/*.build.js | |
**/node_modules/** | |
**/vendor/** | |
build | |
coverage | |
cypress | |
node_modules | |
vendor |
registerBlockType( 'cgb/block-guten-load-post', { | |
// ... | |
keywords: [ | |
__( 'my-block — CGB Block' ), | |
__( 'CGB Example' ), | |
__( 'create-guten-block' ), | |
], | |
attributes: { | |
content: { |
/** | |
* BLOCK: my-block | |
* | |
* Registering a basic block with Gutenberg. | |
* Simple block, renders and saves the same content without any interactivity. | |
*/ | |
// Import CSS. | |
import './style.scss'; | |
import './editor.scss'; |
import hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |
# Habilitar o PHP 7.0 | |
AddHandler application/x-httpd-php70 .php | |
<IfModule mod_suphp.c> | |
suPHP_ConfigPath /opt/php70/lib | |
</IfModule> |