This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function foundation_pagination($before = '', $after = '') { | |
global $wpdb, $wp_query; | |
$request = $wp_query->request; | |
$posts_per_page = intval(get_query_var('posts_per_page')); | |
$paged = intval(get_query_var('paged')); | |
$numposts = $wp_query->found_posts; | |
$max_page = $wp_query->max_num_pages; | |
if ( $numposts <= $posts_per_page ) { return; } | |
if(empty($paged) || $paged == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'allowed_http_origins', 'add_allowed_origins' ); | |
function add_allowed_origins( $origins ) { | |
$origins[] = 'https://site1.example.com'; | |
$origins[] = 'https://site2.example.com'; | |
return $origins; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="accordion"> | |
<div class="accordion-header">Et quasi architecto</div> | |
<div class="accordion-content">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</div> | |
<div class="accordion-header">Nemo enim ipsam</div> | |
<div class="accordion-content">Et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</div> | |
<div class="accordion-header">Sed ut perspiciatis</div> | |
<div class="accordion-content">Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur.</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="hero"> | |
<div class="container"> | |
<div class="blogItem blogItem__fl"> | |
<div class="blogItem__cat"> | |
<div class="b-center">Lorem ipsum dolor sit amet.</div> | |
</div> | |
<div class="blogItem__dt">10/12/2012</div> | |
</div> | |
<div class="blogItem blogItem__fl"> | |
<div class="blogItem__cat"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyTheme | |
{ | |
private function actionAfterSetup($function) | |
{ | |
add_action('after_setup_theme', function() use ($function) { | |
$function(); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'label' => '', // Text in Label | |
'class' => '', | |
'style' => '', | |
'wrapper_class' => '', | |
'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
'id' => '', // required | |
'name' => '', //name will set from id if empty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_before_order_notes', 'bbloomer_add_custom_checkout_field' ); | |
function bbloomer_add_custom_checkout_field( $checkout ) { | |
$current_user = wp_get_current_user(); | |
$saved_license_no = $current_user->license_no; | |
woocommerce_form_field( 'license_no', array( | |
'type' => 'text', | |
'class' => array( 'form-row-wide' ), | |
'label' => 'License Number', | |
'placeholder' => 'CA12345678', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Vue 3 Render Function: https://v3.vuejs.org/guide/render-function */ | |
// Import utilities from Vue | |
import { h, resolveComponent } from "vue"; | |
import getLinkTag, { ANCHOR_TAG, FRAMEWORK_LINK } from "./getLinkTag"; | |
const SmartLink = { | |
props: { | |
href: { | |
type: String, | |
default: "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sage includes | |
* | |
* The $sage_includes array determines the code library included in your theme. | |
* Add or remove files to the array as needed. Supports child theme overrides. | |
* | |
* Please note that missing files will produce a fatal error. | |
* | |
* @link https://github.com/roots/sage/pull/1042 |