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
<!-- wp:columns {"verticalAlignment":"top","align":"wide"} --> | |
<div class="wp-block-columns alignwide are-vertically-aligned-top"><!-- wp:column {"verticalAlignment":"top","width":"25%"} --> | |
<div class="wp-block-column is-vertically-aligned-top" style="flex-basis:25%"></div> | |
<!-- /wp:column --> | |
<!-- wp:column {"verticalAlignment":"top","width":"50%"} --> | |
<div class="wp-block-column is-vertically-aligned-top" style="flex-basis:50%"><!-- wp:image {"align":"center","id":37,"sizeSlug":"full","linkDestination":"none","className":"is-style-rounded"} --> | |
<div class="wp-block-image is-style-rounded"><figure class="aligncenter size-full"><img src="https://joec.live/wp-content/uploads/2021/06/joe-casabona-nobg-2021-small.jpg" alt="" class="wp-image-37"/></figure></div> | |
<!-- /wp:image --> |
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 | |
$a = array( 'joe' => 35, | |
'phil' => 33, | |
); | |
echo $a[0]; //this will throw an error | |
?> | |
<?php |
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 | |
function convert_fm_to_acf() { | |
$args = array( | |
'posts_per_page' => -1, | |
'post_type' => 'post', | |
); | |
$the_query = new WP_Query( $args ); | |
while ( $the_query->have_posts() ) { | |
$the_query->the_post(); |
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 | |
//For setting all LD videos to controls on. | |
function jc_set_video_controls() { | |
$lessons = new WP_Query( | |
array( | |
'post_type' => array( 'sfwd-lessons', 'sfwd-topic' ), | |
'posts_per_page' => -1, | |
) | |
); |
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 | |
function wpp_get_media_URL() { | |
if ( function_exists( 'powerpress_get_enclosure_data' ) ) { | |
$episodeData = powerpress_get_enclosure_data( get_the_ID() ); | |
if ( ! empty( $episodeData['url'] ) ) { | |
return $episodeData['url']; | |
} | |
} | |
return false; |
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 | |
// Update group status when member status changes. | |
function cc_update_ld_group_from_member_status( $user_membership, $old_status, $new_status ) { | |
$ld_group_id = LEARNDASH_GROUP_ID; | |
$user_id = $user_membership->get_user_id(); | |
$wp_user = get_userdata( $user_id ); | |
if ( wc_memberships_is_user_active_member( $user_id, $user_membership->get_plan_id() ) ) { | |
ld_update_group_access( $user_id, $ld_group_id, false ); |
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 paginate_child_pages( $post ) { | |
$page_id = $post->ID; | |
$args = array( | |
'post_type' => 'page', | |
'posts_per_page' => -1, | |
'post_parent' => $page_id, | |
'order' => 'ASC', //change to fit your order | |
'orderby' => 'menu_order', //change to fit your order | |
); |
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 function works with WooCommerce URL Coupons | |
* When a coupon gets deferred, it's added to a list of deferred_url_coupons. | |
* This function accepts a coupon ID ($coupon_id) as an argument, and gets all of the deferred_coupons | |
* as an array. The coupon ID would be an array key,which is what this function checks for. | |
* A message is printed. nothing is returned. | |
**/ | |
function get_deferred_coupons( $coupon_id ) { | |
global $woocommerce; | |
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 | |
add_filter( 'content_save_pre', 'wpp_clean_google_docs' ); | |
function wpp_clean_google_docs( $content ) { | |
if ( ! ( 'transcript' == get_post_type() ) ) { | |
return $content; | |
} | |
$search = array( ' ', | |
'</span>' |
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
{ | |
"editor.fontSize": 15, | |
"terminal.integrated.fontSize": 18, | |
"editor.minimap.enabled": false, | |
"editor.fontFamily": "'Dank Mono', Menlo, Monaco, 'Courier New', monospace", | |
"editor.wordWrap": "on", | |
"terminal.integrated.shell.osx": "/bin/zsh", | |
"terminal.integrated.fontFamily": "'Dank Mono', 'Source Code Pro for Powerline'", | |
"workbench.colorTheme": "GitHub Plus", | |
"terminal.external.osxExec": "Hyper.app", |
NewerOlder