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
import React from "react"; | |
import Gist from "react-gist"; | |
import { testShortCode, getShortCodeProps } from "./shortcode-utils"; | |
const gist = { | |
name: "gist", | |
priority: 10, | |
test: ({ node }) => testShortCode(node, "gist"), //👈 [gist ] | |
processor: ({ node }) => { | |
/* |
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
import * as functions from 'firebase-functions' | |
import * as express from 'express' | |
import * as cors from 'cors' | |
// give us the possibility of manage request properly | |
const app = express() | |
// Automatically allow cross-origin requests | |
app.use(cors({ origin: true })) |
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
<? | |
/** | |
* Get all the info we can get from a WP attachment | |
* @param int $img_id attachment id of the image to obtain the info | |
* @return an associative array with all the info of the image | |
*/ | |
function get_all_image_info($img_id) { | |
$img = wp_get_attachment_metadata($img_id); | |
//we add the original source info to the sizes array given in the previous function |