This file contains 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
// change slug on post if title is changed. | |
add_action( 'save_post', 'icput_post_title_fix' ); | |
function icput_post_title_fix( $post_id ) { | |
$url = rwmb_get_value( 'canonical_url', '', $post_id ); | |
if ( empty( $url ) ) { | |
return; | |
} |
This file contains 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 | |
/opt/homebrew/bin/ffmpeg -ss 0.5 -f avfoundation -r 30.000030 -i "0" -t 1 /Users/topher/window_shots/"grmi_$(date +%F_%H-%M-%S).jpg" -frames:v 1 | |
unset -v latest | |
for file in /Users/topher/window_shots/*; do | |
[[ $file -nt $latest ]] && latest=$file | |
done | |
keychain --noask --eval id_dsa |
This file contains 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
/* | |
* Get the auth token from local option | |
* | |
* @access public | |
* @return NULL | |
*/ | |
public function get_local_auth_token() { | |
// get the token from the options table | |
$this->auth_token = get_option( 'bigcommerce_auth_token' ); |
This file contains 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
/* | |
* Get the auth token from BigCommerce | |
* | |
* @access public | |
* @return string $token | |
*/ | |
public function get_remote_auth_token() { | |
// Set up the REST authentication headers | |
$headers[ 'X-Auth-Token' ] = $this->access_token; |
This file contains 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
$meta_query = [ | |
'meta_key' => 'pmp_required_levels', | |
'meta_value' => get_pmpro_subscription_ids( get_current_user_id() ), | |
'meta_compare' => 'IN', | |
'post_type' => 'li_resources', | |
]; | |
// value holds an array like this | |
Array | |
( |
This file contains 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 | |
/** | |
* This template is used to display the Checkout page when items are in the cart | |
*/ | |
global $post; ?> | |
<table id="edd_checkout_cart" <?php if ( ! edd_is_ajax_disabled() ) { echo 'class="ajaxed"'; } ?>> | |
<thead> | |
<tr class="edd_cart_header_row"> | |
<?php do_action( 'edd_checkout_table_header_first' ); ?> |
This file contains 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
function t1k_get_parent_theme_css() { | |
wp_enqueue_style( 'make-theme', get_template_directory_uri() . '/style.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 't1k_get_parent_theme_css' ); |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am topher1kenobe on github. | |
* I am topher1kenobe (https://keybase.io/topher1kenobe) on keybase. | |
* I have a public key whose fingerprint is B667 2067 B47F D1B8 AC08 7340 8314 A0AF 19F8 B110 | |
To claim this, I am signing this object: |
NewerOlder