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 | |
/** | |
* Instantiate the IE_Slider instance | |
* | |
* @since IE_Slider 1.0 | |
*/ | |
class IE_Slider { | |
/** | |
* Term ID. |
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 | |
add_filter( 'rwmb_meta_boxes', 'ie_slideshow_shortcode' ); | |
function ie_slideshow_shortcode( $meta_boxes ) { | |
$prefix = 'ie-slider-'; | |
$meta_boxes[] = [ | |
'title' => __( 'IE Slideshow', 'ie-slider' ), | |
'id' => 'ie-slideshow', | |
'closed' => true, |
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 | |
$groups = rwmb_meta( 'ie-slider-sliders' ); | |
foreach ( $groups as $group ) { | |
// Field slider: | |
$subgroups = $group[ 'slider' ] ?? ''; | |
foreach ( $subgroups as $subgroup ) { | |
// Field title: | |
echo $subgroup[ 'title' ] ?? ''; |
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( 'kadence_blocks_pro_query_loop_query_vars', 'hba_home_events_loop', 10, 3 ); | |
function hba_home_events_loop( $query, $ql_query_meta, $ql_id ) { | |
if( 265 === $ql_id ) { | |
$meta_query = array( | |
array( | |
'key' => 'hba_event_beginning', // your event meta here | |
'value' => date('Y-m-d H:m'), | |
'type' => 'DATETIME', | |
'compare' => '>=' // only show dates matching the current date or in the future |
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
// 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 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 | |
/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 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
/* | |
* 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 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
/* | |
* 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; |
NewerOlder