This file contains 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
<?php | |
/* | |
Plugin Name: Enable OAuth UI | |
Plugin URI: https://gist.github.com/rheinardkorf/dab0f0f46b814e1a7d1d | |
Description: Allows you to create consumer key pairs without WP CLI and the ability to name them for each APP. Must have WP API Oauth Server plugin active. | |
Version: 0.1 | |
Author: Rheinard Korf | |
Author URI: https://gist.github.com/rheinardkorf/ | |
License: GPL2 | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains 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
<?php | |
/* | |
* Auto-login script to save having to manually login when developing a WP site. | |
* | |
* Place in wp-content/mu-plugins and remember to add to .gitignore for safety | |
* | |
* Add the DEV_GET_PARAMETER to the url to activate the script and login for you | |
* e.g. http://localhost:8080/?dev | |
*/ | |
This file contains 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
<?php | |
class MyPlugin { | |
/** | |
* Add this at top of your plugin class constructor or whichever method in your class you use to bootstrap your plugin. | |
* e.g. public static function bootstrap() | |
*/ | |
public static function bootstrap() { | |
if ( version_compare( '5.3', phpversion(), '>' ) ) { |
This file contains 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
Verifying that +rheinardkorf is my blockchain ID. https://onename.com/rheinardkorf |
This file contains 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
#! /usr/bin/ruby | |
# A different implementation to Brett Terpstra's Markdown Service Tools: "md - Links - Chrome Tabs" | |
# This version looks at all tabs across all open Chrome windows. | |
# This version produces output as a list of links as well as a reference table including title tags. | |
# $KCODE = 'u' | |
UNICODE_COMPETENT = ((RUBY_VERSION)[0..2].to_f > 1.8) | |
unless UNICODE_COMPETENT # lower than 1.9 | |
class String |
This file contains 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
#!/usr/bin/swift | |
// @author: Rheinard Korf | |
import Foundation | |
// We need this struct to make life easier | |
struct TabItem { | |
var title: String | |
var name: String | |
var link: String |
This file contains 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
<?php | |
// Hook in the editor's `enqueue_scripts` function | |
add_action( 'some_footer_action', array( '_WP_Editors', 'enqueue_scripts' ) ); | |
// Some function that's going to render in the page footer | |
function some_footer_render_function() { | |
do_action( 'some_footer_action' ); | |
} |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
<?php | |
/* | |
Plugin Name: Slack SSO | |
Plugin URI: https://gist.github.com/rheinardkorf/91431d6e8e7b5070730352321876d5d3 | |
Description: Sign into your WordPress site with Slack. | |
Version: 0.1-alpha | |
Author: Rheinard Korf | |
Author URI: https://gist.github.com/rheinardkorf/91431d6e8e7b5070730352321876d5d3 | |
License: GPL2 | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains 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
<?php | |
/** | |
* Whitelist embedded links in the REST API responses | |
* | |
* This is often useful if you want to only get specified resources embedded along with the | |
* main resources, rather than the "all of nothing" approach of passing `?_embed` to the API request. | |
* | |
* You can either pass a comma seperated list of relationships or an array of string via the `_embed_include` query param. | |
* |