View plugin.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 | |
/* | |
* Dependent Plugin Activation/Deactivation | |
* | |
* Sources: | |
* 1. https://pippinsplugins.com/checking-dependent-plugin-active/ | |
* 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/ | |
* | |
*/ | |
View custom-css-zoom-wordpress-plugin.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
/* Hide the back arrow on top of the meeting window and join form */ | |
.zoom-window-wrap .go-back-icon { | |
display: none; | |
} | |
/* Center align Zoom WP form */ | |
.zoom-window-wrap .meeting-view > div { | |
text-align: center; | |
} |
View index.html
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
<script> | |
var join_link = document.querySelector('.join-link'); | |
if(join_link) { | |
join_link.setAttribute('onclick', join_link.getAttribute('onclick').replace('_self', '_blank')); | |
} | |
</script> |
View .htaccess
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
# Expires headers (for better cache control) | |
<IfModule mod_expires.c> | |
ExpiresActive on # Perhaps better to whitelist expires rules? Perhaps. ExpiresDefault "access plus 1 month" # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5) ExpiresByType text/cache-manifest "access plus 0 seconds" # Your document html ExpiresByType text/html "access plus 0 seconds" # Data ExpiresByType text/xml "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType application/json "access plus 0 seconds" # Feed ExpiresByType application/rss+xml "access plus 1 hour" ExpiresByType application/atom+xml "access plus 1 hour" # Favicon (cannot be renamed) ExpiresByType image/x-icon "access plus 1 week" # Media: images, video, audio ExpiresByType image/gif "access plus 4 months" ExpiresByType image/png "access plus 4 months" ExpiresByType image/jpeg "access plus 4 months" ExpiresByType image/webp "access plus 4 months" ExpiresByType video/ogg "access plus 1 month" ExpiresByType au |
View functions.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 | |
add_action( 'wp_enqueue_scripts', 'myprefix_add_custom_js'); | |
function myprefix_add_custom_js() { | |
wp_add_inline_script( 'jquery', | |
' | |
jQuery(function($) { | |
/** | |
* catch AJAX complete events, to catch wordpress actions |
View functions.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 | |
add_action( 'learndash-lesson-row-title-before', 'custom_add_title_to_course_lesson_table', 10, 3); | |
function custom_add_title_to_course_lesson_table( $lesson_id, $course_id, $user_id ) { | |
if( ! current_user_can('group_leader') && ! current_user_can('administrator') ) { | |
return; | |
} | |
wp_add_inline_script( 'learndash-front', | |
'if( jQuery("#ld-expand-'.esc_html( $lesson_id ).'").length != 0 ) { | |
jQuery("#ld-expand-'.esc_html( $lesson_id ).'").find(".ld-item-name").attr("title", '.esc_attr( $lesson_id ).') |
View functions.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 | |
add_action( 'learndash-lesson-row-title-after', 'learndash_add_tag_to_new_lessons', 10, 3); | |
function learndash_add_tag_to_new_lessons( $lesson_id, $course_id, $user_id ) { | |
$lesson = get_post( $lesson_id ); | |
if ( strtotime( $lesson->post_modified ) > strtotime( '-30 days' ) ) { | |
echo "<span class='ld-content-new-tag'>" . __( "(New)", 'sfwd-lms' ) . "</span>"; | |
} | |
} |
View functions.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 | |
add_filter( 'mycred_setup_hooks', 'custom_hook_renew_rcpro_subscription' ); | |
function custom_hook_renew_rcpro_subscription( $installed ) | |
{ | |
$installed['hook_rcpro_renew_subs'] = array( | |
'title' => __( '%_plural% for RCP Subscription renewal', 'mycred' ), | |
'description' => __( 'Award %_plural% when RCP subscription is renewed', 'mycred' ), | |
'callback' => [ 'myCRED_Hook_Rcpro_Renew' ] | |
); |
View functions.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
function ld_next_lesson_link() { | |
global $post; | |
$course_id = learndash_get_course_id( $post ); | |
$user = _wp_get_current_user(); | |
if( $course_id && isset( $user->ID ) ) { | |
$lessons = learndash_get_lesson_list( $course_id ); | |
if( $lessons ) { | |
$first_lesson = reset($lessons); |
View .htaccess
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
#Prevent image hotlinking in WordPress | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourwebsite.com [NC] | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?facebook.com [NC] | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?twitter.com [NC] | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?other-websites-go-here.com [NC] | |
RewriteRule \.(jpg|jpeg|png|gif)$ - [F] |
NewerOlder