No longer kept up to date.
Please see Sridhar's fork.
| http://apassant.net/2012/01/16/timeout-for-html5-localstorage/ | |
| var hours = 24; // Reset when storage is more than 24hours | |
| var now = new Date().getTime(); | |
| var setupTime = localStorage.getItem('setupTime'); | |
| if (setupTime == null) { | |
| localStorage.setItem('setupTime', now) | |
| } else { | |
| if(now-setupTime > hours*60*60*1000) { | |
| localStorage.clear() |
| // Load Font Awesome | |
| add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
| function enqueue_font_awesome() { | |
| wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css' ); | |
| } |
| # ----------------------------------------------------------------- | |
| # .gitignore for WordPress | |
| # Bare Minimum Git | |
| # http://ironco.de/bare-minimum-git/ | |
| # ver 20150227 | |
| # | |
| # This file is tailored for a WordPress project | |
| # using the default directory structure | |
| # | |
| # This file specifies intentionally untracked files to ignore |
| //* Remove the site description | |
| remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); | |
| //* Enqueue jQuery - Background video | |
| add_action( 'wp_enqueue_scripts', 'enqueue_html5_background_video' ); | |
| function enqueue_html5_background_video() { | |
| if ( (is_home() || is_front_page()) && !wp_is_mobile() ) { | |
| wp_enqueue_script( 'backgroundvideo', get_bloginfo( 'stylesheet_directory' ) . '/js/jquery.backgroundvideo.min.js', array( 'jquery' ), '', true ); |
| import re | |
| import uuid | |
| import base64 | |
| def uuid_url64(): | |
| """Returns a unique, 16 byte, URL safe ID by combining UUID and Base64 | |
| """ | |
| rv = base64.b64encode(uuid.uuid4().bytes).decode('utf-8') | |
| return re.sub(r'[\=\+\/]', lambda m: {'+': '-', '/': '_', '=': ''}[m.group(0)], rv) |
No longer kept up to date.
Please see Sridhar's fork.
| // Move Yoast to bottom | |
| function yoasttobottom() { | |
| return 'low'; | |
| } | |
| add_filter( 'wpseo_metabox_prio', 'yoasttobottom'); |
| /** | |
| * Code goes in functions.php or a custom plugin. | |
| */ | |
| add_action( 'woocommerce_email', 'unhook_those_pesky_emails' ); | |
| function unhook_those_pesky_emails( $email_class ) { | |
| /** | |
| * Hooks for sending emails during store events | |
| **/ |
| foreach ( array( 'pre_term_description' ) as $filter ) { | |
| remove_filter( $filter, 'wp_filter_kses' ); | |
| } | |
| foreach ( array( 'term_description' ) as $filter ) { | |
| remove_filter( $filter, 'wp_kses_data' ); | |
| } |