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 | |
# Bash script to set drop local site created by sitesetup script | |
# See https://gist.github.com/jonathanbossenger/2dc5d5a00e20d63bd84844af89b1bbb4 | |
SSL_CERTS_DIRECTORY=/home/jonathan/ssl-certs | |
SITES_DIRECTORY=/home/jonathan/development/websites | |
SITE_NAME=$1 | |
MYSQL_DATABASE=$(echo $SITE_NAME | sed 's/[^a-zA-Z0-9]//g') |
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 | |
namespace App\Providers; | |
use Laravel\Dusk\Browser; | |
use Illuminate\Support\ServiceProvider; | |
class DuskServiceProvider extends ServiceProvider | |
{ | |
/** |
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 | |
# Bash script to set up local site using LAMP on Ubuntu | |
# Requires Apache2, MySQL, mkcert (https://github.com/FiloSottile/mkcert) | |
# See also sitedrop.sh https://gist.github.com/jonathanbossenger/4950e107b0004a8ee82aae8b123cce58 | |
HOME_USER=jonathan | |
SSL_CERTS_DIRECTORY=/home/jonathan/ssl-certs | |
SITES_DIRECTORY=/home/jonathan/development/websites |
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( 'ssp_widget_series_episodes_args', 'custom_ssp_widget_series_episodes_args' ); | |
function custom_ssp_widget_series_episodes_args( $arguments ) { | |
$arguments['posts_per_page'] = 10; | |
return $arguments; | |
} |
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 | |
//Hook into the ssp_episode_query_args to show episode stats for all public and private podcasts | |
add_filter( 'ssp_episode_query_args', 'ssp_episode_query_args_callback', 10, 2 ); | |
function ssp_episode_query_args_callback( $args, $context ) { | |
if ( 'stats' !== $context ) { | |
return $args; | |
} | |
$args['post_status'] = array( 'publish', 'private' ); |
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 audio file duration to a podcast when using Simple Bulk Uploader | |
global $ss_podcasting; | |
$duration = $ss_podcasting->get_file_duration( $file ); | |
if ( $duration ) { | |
update_post_meta( $post_id, 'duration', $duration ); | |
} |
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 | |
remove_all_actions( 'do_feed_rss2' ); | |
add_action( 'do_feed_rss2', 'prefix_podcast_rss_feed', 10, 1 ); | |
function prefix_podcast_rss_feed() { | |
load_template( SSP_PLUGIN_PATH . '/templates/feed-podcast.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
add_action( 'init', 'ssp_add_categories_to_podcast', 12 ); | |
function ssp_add_categories_to_podcast () { | |
register_taxonomy_for_object_type( 'category', 'podcast' ); | |
} |
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
jQuery(function ($) { | |
$( document ).ready(function() { | |
$(“.diviclick”).on(“click”, function(){ | |
event.preventDefault(); | |
if ($('#email').val().length > 0){ | |
$(‘#guiarapidaoptin’).submit(); | |
}else { | |
alert('A valid email address is required') | |
} | |
}); |