start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
/** | |
* Determine the video ID from the URL. | |
* | |
* @param string $url URL. | |
* | |
* @return int|false Video ID, or false if none could be retrieved. | |
*/ | |
function get_video_id_from_url( $url ) { |
<?php | |
/** | |
* Cache http response to store response data in cache once received success response. | |
* This helps avoiding duplicate http requests. | |
* Also helpful in cases where we may have limited API requests rate. (i.e 25 requests per day) | |
*/ | |
namespace WP_Local_Helper; | |
// Domain list which needs uncached response each time. |
<?php | |
/** | |
* Fix/Workaround for two-factor option issues. | |
*/ | |
namespace Fix; | |
require_once __DIR__ . '/two-factor-totp-fix.php'; | |
Two_Factor_Totp\bootstrap(); |
<?php | |
/** | |
* Tachyon image service helper class to extend the resized image data. | |
* | |
* @package tachyon-helper | |
*/ | |
namespace Tachyon_Helper; | |
use Tachyon; |
<?php | |
/** | |
* Accordion ShortCode. | |
* | |
* @param array $accordion_attrs Accordion ShortCode attribute. | |
* | |
* @return string | |
*/ | |
function accordion_register_shortcode( $accordion_attrs ) { |
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.
I hereby claim:
To claim this, I am signing this object:
if ( ! function_exists( 'shortcode_enqueue_editor_scripts' ) ) { | |
/** | |
* Enqueue our editor area scripts and styles. | |
*/ | |
function shortcode_enqueue_editor_scripts() { | |
wp_register_script( 'shortcode_editor_script', get_template_directory_uri() . '/js/admin/editor-script.js', array( 'shortcode-ui' ), false, true ); | |
wp_enqueue_script( 'shortcode_editor_script' ); | |
} | |
/** | |
* Enqueue shortcode ui editor script after shortcode UI assets have been enqueued. |