https://twitter.com/share?url=[URL]&text=[TEXT]&related=[USER-NAME]
https://www.facebook.com/share.php?u=[URL]
https://b.hatena.ne.jp/entry/[URL]
function extract_characters_by_font(font_name) { | |
var allElems = document.querySelectorAll('*'); | |
var characters = Array.prototype | |
.filter.call(allElems, function (elem) { | |
var fonts = getComputedStyle(elem)['font-family'].split(',').map(function(font){ | |
return font.trim().replace(/'/g,''); | |
}); | |
return fonts.indexOf(font_name) > -1; | |
}) | |
.map(function (elem) { |
$post_type = 'your-post-type'; | |
add_filter("edit_{$post_type}_per_page", function ($posts_per_page) { | |
return 999; | |
}); | |
// Search `edit_{$post_type}_per_page` in `wp-admin/includes/post.php` for more infomation. |
@mixin responsive-font-size($max-font-size,$min-font-size,$max-viewport-width,$min-viewport-width) { | |
@media (min-width: $min-viewport-width) { | |
:root { | |
$font-size-difference: $max-font-size - $min-font-size; | |
$viewport-width-difference: $max-viewport-width - $min-viewport-width; | |
font-size: calc(100% + ((1vw - #{$min-viewport-width / 100}) * #{100 * $font-size-difference / $viewport-width-difference})); | |
} | |
} | |
// Stop font scaling above $max-viewport-width |
@mixin responsive-property($max-amount,$min-amount,$max-viewport-width,$min-viewport-width,$properties) { | |
@media (min-width: $min-viewport-width) { | |
& { | |
$amount-difference: $max-amount - $min-amount; | |
$viewport-width-difference: $max-viewport-width - $min-viewport-width; | |
@each $property in $properties { | |
#{$property}: calc(#{$min-amount} + ((1vw - #{$min-viewport-width / 100}) * #{100 * $amount-difference / $viewport-width-difference})); | |
} | |
} | |
} |
UPDATE wp_options SET option_value = replace(option_value, 'http://OLD', 'https://NEW') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://OLD','https://NEW'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://OLD', 'https://NEW'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://OLD','https://NEW'); |
The singleton methods of an object are not defined by the class of that object. But they are methods and they must be associated with a class of some sort. The singleton methods of an object are instance methods of the anonymous singleton-class(eigenclass) associated with that object.
To open the singleton-class of the object obj
, use class << obj
class Object
# Get the singleton-class object of a class object.
def singleton_class
module Kernel
# Constants defined in Kernel
A = B = C = D = E = F = "defined in kernel"
end
# Top-level or "global" constants defined in Object
A = B = C = D = E = "defined at toplevel"
class Super
/* | |
# Usage | |
1. Place this script anywhere after your gpt tag. | |
2. Add class `js-gpt-fluid-size` to your slot element. | |
# Notice | |
This script require jQuery to be installed, | |
but you can place this script before jQuery if you want. | |
*/ |
// Click event happened in iframe won't propagate to the containing element of it. | |
// This script provides a workaround to simulate the propagation of click event of iframe. | |
// | |
// inspired by https://gist.github.com/jaydson/1780598#gistcomment-2609301 | |
(function ($) { | |
var selector = '[data-event-category][data-event-action]'; | |
var $elementsContainIframe = $(selector).filter(function () { | |
return $(this).find('iframe,script').length; |