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
add_filter( 'ssp_feed_slug', 'ssp_modify_podcast_feed_slug' ); | |
function ssp_modify_podcast_feed_slug ( $slug ) { | |
return 'new-slug'; | |
} |
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
add_filter( 'ssp_archive_slug', 'ssp_modify_podcast_archive_slug' ); | |
function ssp_modify_podcast_archive_slug ( $slug ) { | |
return 'new-slug'; | |
} |
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
.entry-content img { | |
box-shadow: 0px 0 15px 5px #ccc; | |
} | |
.entry-content .wp-caption-text { | |
text-align: center; | |
} |
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 | |
$str = "String to loop through" | |
$strlen = strlen( $str ); | |
for( $i = 0; $i <= $strlen; $i++ ) { | |
$char = substr( $str, $i, 1 ); | |
// $char contains the current character, so do your processing here | |
} | |
?> |
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 shortcode_function( $params ) { | |
return "Shortcode content"; | |
} | |
add_shortcode( 'shortcode_name', 'shortcode_function' ); | |
?> |
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 | |
die(); | |
?> |
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
body #menu-posts-forum div.wp-menu-image:before { | |
content: "\f325" !important; | |
} | |
body #menu-posts-topic div.wp-menu-image:before { | |
content: "\f348" !important; | |
} | |
body #menu-posts-reply div.wp-menu-image:before { | |
content: "\f125" !important; | |
} |
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( 'sensei_all_access', 'sensei_editor_access' ); | |
function sensei_editor_access( $access ) { | |
if( current_user_can( 'editor' ) ) { | |
$access = true; | |
} | |
return $access; | |
} | |
?> |
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( 'pre_get_posts', 'sensei_lessons_use_menu_order' ); | |
function sensei_lessons_use_menu_order( $query ) { | |
if( is_admin() || 'lesson' != $query->query_vars['post_type'] ) { | |
return; | |
} | |
$query->set( 'orderby', 'menu_order date' ); | |
} |
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( 'woocommerce_order_barcodes_scan_permission', 'modify_woocommerce_order_barcodes_scan_permission' ); | |
function modify_woocommerce_order_barcodes_scan_permission( $has_permission ) { | |
// Do any required permission checks here | |
$has_permission = true; | |
return $has_permission; | |
} | |
?> |