バネ関数とベクトルを使用してスライムを作ってみました。
I tried to make a slime using a spring function and vector.
Forked from ykob's Pen canvas demo template.
A Pen by Captain Anonymous on CodePen.
<div class="row"> | |
<div class="archive-header"> | |
<?php | |
//firs argument of the action is WHERE the function hooks into | |
add_action( 'woocommerce_before_main_content', 'woocommerce_category_image', 2 ); | |
function woocommerce_category_image() { | |
if ( is_product_category() ){ | |
global $wp_query; | |
$cat = $wp_query->get_queried_object(); | |
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); |
.ubermenu-main .ubermenu-item-level-0.ubermenu-has-submenu-drop.ubermenu-active > .ubermenu-target:before{ | |
content: ''; | |
display:block; | |
border:6px solid transparent; | |
border-bottom-color:#fff; | |
position:absolute; | |
bottom:0; | |
left:50%; | |
margin-left:-3px; | |
margin-bottom:-1px; |
if( !function_exists('wpex_fix_shortcodes') ) { | |
function wpex_fix_shortcodes($content){ | |
$array = array ( | |
'<p>[' => '[', | |
']</p>' => ']', | |
']<br />' => ']' | |
); | |
$content = strtr($content, $array); | |
return $content; | |
} |
/** | |
* [WordPress] Template Redirect | |
* Use archive-books.php for Genre taxonomy archives. | |
*/ | |
add_filter( 'template_include', 'sk_template_redirect' ); | |
function sk_template_redirect( $template ) { | |
if ( is_tax( 'sports-book-cat' ) ) | |
$template = get_query_template( 'archive-books' ); | |
return $template; |
//remove add to cart button on category archive pages. | |
function remove_loop_button(){ | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
} | |
add_action('init','remove_loop_button'); |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
// WP_Query arguments | |
$args = array ( | |
'post_type' => 'events', | |
'pagination' => true, | |
'paged' => $paged, | |
'meta_query' => array( | |
array( | |
'key' => 'event_date', | |
'value' => date('Ymd', strtotime('now')), |
バネ関数とベクトルを使用してスライムを作ってみました。
I tried to make a slime using a spring function and vector.
Forked from ykob's Pen canvas demo template.
A Pen by Captain Anonymous on CodePen.
<?php | |
function fetchData($url){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 20); | |
$result = curl_exec($ch); | |
curl_close($ch); | |
return $result; | |
} |