Quick experiments with :before & :after hover effects on single line elements.
A Pen by Misha Heesakkers on CodePen.
# Rewrite <title> tag for better SEO | |
function seo_title() { | |
global $post, $page, $paged; | |
$sep = " | "; # Separator | |
$newtitle = get_bloginfo('name'); # Default | |
# Single page ######################################## | |
if (is_single() || is_page()) { | |
$newtitle = single_post_title("", false); # default title | |
} |
<?php | |
function basic_wp_seo() { | |
global $page, $paged, $post; | |
$default_keywords = 'wordpress, plugins, themes, design, dev, development, security, htaccess, apache, php, sql, html, css, jquery, javascript, tutorials'; // customize | |
$output = ''; | |
// description | |
$seo_desc = get_post_meta($post->ID, 'mm_seo_desc', true); | |
$description = get_bloginfo('description', 'display'); | |
$pagedata = get_post($post->ID); |
function replace_open_sans() { | |
// Kill the original style | |
wp_deregister_style('open-sans'); | |
// Replace it with your own (just as an example, I included only the 300 weight) | |
wp_register_style( 'open-sans', 'http://fonts.googleapis.com/css?family=Open+Sans:300' ); | |
wp_enqueue_style( 'open-sans'); | |
} | |
add_action( 'wp_enqueue_scripts', 'replace_open_sans' ); | |
// Thanks to @timkinnane | |
add_action( 'admin_enqueue_scripts', 'replace_open_sans' ); |
<?php | |
//woocommerce中文网关支持paypal | |
// details at http://devework.com/support-paypal-gateway-in-woocommerce.html | |
//本函数解决的问题:贝宝不支持你的商铺货币。Gateway Disabled: PayPal does not support your store's currency. | |
add_filter( 'woocommerce_paypal_supported_currencies', 'enable_custom_currency' ); | |
function enable_custom_currency($currency_array) { | |
$currency_array[] = 'CNY'; | |
return $currency_array; | |
} |
<?php | |
// Register Custom Post Types | |
add_action('init', 'register_custom_posts_init'); | |
function register_custom_posts_init() { | |
// Register Products | |
$products_labels = array( | |
'name' => 'Products', | |
'singular_name' => 'Product', | |
'menu_name' => 'Products' |
<button id="load-disqus" onclick="disqus.load();"> | |
加载Disqus | |
</button> | |
<div id="disqus_thread"></div> |
Quick experiments with :before & :after hover effects on single line elements.
A Pen by Misha Heesakkers on CodePen.
# see below for UPDATES that include more shorter ways of conversions | |
# How to convert GTF format into BED12 format (Human-hg19)? | |
# How to convert GTF or BED format into BIGBED format? | |
# Why BIGBED (If GTF or BED file is very large to upload in UCSC, you can use trackHubs. However trackHubs do not accept either of the formats. Therefore you would need bigBed format) | |
# First, download UCSC scripts | |
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/gtfToGenePred | |
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/genePredToBed | |
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed |
######################################################################### | |
# ================================================== # | |
# $ Mikrotik RouterOS update script for CloudFlare $ # | |
# ================================================== # | |
# # | |
# - You need a CloudFlare account & api key (look under settings), # | |
# a zone and A record in it # | |
# - All variables in first section are obvious, except CFid, # | |
# To obtain CFzoneid use following command in any unix shell: # | |
# curl -X GET "https://api.cloudflare.com/client/v4/accounts" -H "X-Auth-Email: YOUR_EMAIL" -H "X-Auth-Key: YOUR_API_KEY" -H "Content-Type: application/json" | python -mjson.tool |
######################################################################### | |
# ================================================== # | |
# $ Mikrotik RouterOS update script for CloudFlare $ # | |
# ================================================== # | |
# # | |
# - You need a CloudFlare account & api key (look under settings), # | |
# a zone and A record in it # | |
# - All variables in first section are obvious, except CFid, # | |
# To obtain CFzoneid use following command in any unix shell: # | |
# curl -X GET "https://api.cloudflare.com/client/v4/zones" -H "X-Auth-Email: YOUR_EMAIL" -H "X-Auth-Key: YOUR_API_KEY" -H "Content-Type: application/json" | python -mjson.tool |