I hereby claim:
- I am carmolim on github.
- I am carmolim (https://keybase.io/carmolim) on keybase.
- I have a public key ASD7J0n8FVYc0-hmL9AjE_Kq2t0699Wp3sg0sB8WY7wg-Qo
To claim this, I am signing this object:
| #!/bin/sh | |
| PROXY_INTERFACE="USB Ethernet" | |
| PROXY_HOST=localhost | |
| PROXY_PORT=1080 | |
| if [[ $1 == "on" ]]; then | |
| sudo networksetup -setsocksfirewallproxy "$PROXY_INTERFACE" $PROXY_HOST $PROXY_PORT | |
| echo "SOCKS proxy enabled" |
| function slugify($text, string $divider = '-') | |
| { | |
| // replace non letter or digits by divider | |
| $text = preg_replace('~[^\pL\d]+~u', $divider, $text); | |
| // transliterate | |
| $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); | |
| // remove unwanted characters | |
| $text = preg_replace('~[^-\w]+~', '', $text); |
| <?php | |
| $the_query = new WP_Query( array( | |
| 'orderby' => 'rand', | |
| 'post__not_in'=> array(get_the_ID()), | |
| 'post_type' => 'area-atuacao', | |
| 'posts_per_page' => '3', | |
| 'tax_query' => array( | |
| array( | |
| 'taxonomy' => 'categoria_atuacao', // custom tax |
| /** | |
| * Função para gerar breadcumbs baseado em uma taxonomia | |
| */ | |
| show_breadcrumb($term->name,"taxonomy"); | |
| function show_breadcrumb($name,$type){ | |
| $list = ""; | |
| $home = get_bloginfo("home"); |
I hereby claim:
To claim this, I am signing this object:
| let startX; | |
| let startY; | |
| let possibleDirections = []; | |
| const mod = 20; | |
| let points = []; | |
| function setup() { |
| <?php $terms = get_terms( 'categoria' ); // taxonomy name ?> | |
| <ul clas=""> | |
| <li data-filter="*">Todas</li> | |
| <?php foreach ($terms as $term): ?> | |
| <?php $temp = get_term($term); ?> | |
| <li data-filter=".<?php echo $temp->slug ?>"><?php echo $temp->name ?></li> | |
| <?php endforeach; ?> |
#Ajax no Wordpress
###functions.php (ou arquivo incluído)
<?php
#Registra o seu script com o seu ajax no functions.php, no meu caso samuel.js
wp_register_script('samuel', get_bloginfo('template_directory') . "/scripts/samuel.js", array('jquery'));| <?php | |
| $args = array( | |
| 'post_type' => 'projeto' | |
| ); | |
| ?> | |
| <?php $the_query = new WP_Query( $args ); ?> | |
| <?php if ( $the_query->have_posts() ) : ?> |
| older_than:6y | |
| size:10m | |
| filename:[mp3] | |
| Larger:5m |