Skip to content

Instantly share code, notes, and snippets.

View themeblvd's full-sized avatar

Jason Bobich themeblvd

View GitHub Profile
@pento
pento / php-block.js
Last active February 29, 2024 01:31
Converting a shortcode to a block: this method is fast to do, but a mediocre UX. You should only use this as a stopgap until you can implement a full block UI.
// 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.
@cliffordp
cliffordp / force-ssl-url-scheme.php
Last active March 27, 2017 16:32 — forked from webaware/force-ssl-url-scheme.php
Get SSL / HTTPS to work properly on WP Engine type hosts. Jason Cohen, Aug 28 05:29 pm (CDT): This is because the SSL processing is done at the front-end caching layer and not at the back-end PHP layer. By the time the request gets back there, the protocol is HTTP again rather than HTTPS. However, WordPress also defines a PHP variable saying whe…
<?php
/*
Plugin Name: Force SSL URL Scheme
Plugin URI: https://gist.github.com/cliffordp/6378826
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work. Recommended to me by Jason Cohen of WP Engine on 2013-08-28.
Version: 1.0.0
Author: WebAware
Author URI: http://www.webaware.com.au/
*/