Skip to content

Instantly share code, notes, and snippets.

View ramiy's full-sized avatar

Rami Yushuvaev ramiy

View GitHub Profile
@solenoid
solenoid / gist:1372386
Created November 17, 2011 04:49
javascript ObjectId generator
var mongoObjectId = function () {
var timestamp = (new Date().getTime() / 1000 | 0).toString(16);
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() {
return (Math.random() * 16 | 0).toString(16);
}).toLowerCase();
};
<?php
class WP_Metatags {
private static $tags = array();
public static function set_tag( $handle, $content, $type = 'name' ) {
if ( ! is_array( self::$tags ) ) {
return new WP_Error( 'metatags_already_printed', __( 'The HTML `meta` tags have already been printed.' ) );
}
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@chrisvanpatten
chrisvanpatten / README.md
Created December 10, 2018 16:15
Gutenberg component documentation template