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 woocommerce_version_check( $version = '2.1' ) { | |
if ( function_exists( 'is_woocommerce_active' ) && is_woocommerce_active() ) { | |
global $woocommerce; | |
if( version_compare( $woocommerce->version, $version, ">=" ) ) { | |
return true; | |
} | |
} | |
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
#rolltable-data-tables, .rolltable_tables { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
justify-content: space-around; | |
gap: 0.5em; | |
} | |
.rolltable_data_block { | |
flex: 0 0 45%; | |
min-width: 450px; |
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 | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
class WordPress_Plugin_Template_Settings { | |
private $dir; | |
private $file; | |
private $assets_dir; | |
private $assets_url; | |
private $settings_base; |
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_episode_download_link', 'ssp_use_raw_audio_file_url', 10, 3 ); | |
function ssp_use_raw_audio_file_url ( $url, $episode_id, $file ) { | |
return $file; | |
} |
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
<?php | |
function plugin_add_settings_link( $links ) { | |
$settings_link = '<a href="options-general.php?page=plugin_name">' . __( 'Settings' ) . '</a>'; | |
array_push( $links, $settings_link ); | |
return $links; | |
} | |
$plugin = plugin_basename( __FILE__ ); | |
add_filter( "plugin_action_links_$plugin", 'plugin_add_settings_link' ); | |
?> |
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 woocommerce_get_order_statuses() { | |
$order_statuses = get_terms( 'shop_order_status', array( 'hide_empty' => false ) ); | |
$statuses = array(); | |
foreach ( $order_statuses as $status ) { | |
$statuses[ $status->slug ] = $status->name; | |
} | |
return $statuses; | |
} | |
?> |
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 | |
session_start(); | |
add_filter( 'posts_orderby', 'randomise_with_pagination' ); | |
function randomise_with_pagination( $orderby ) { | |
if( is_front_page() ) { | |
// Reset seed on load of initial archive page |
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 fields to new vendor form | |
add_action( 'shop_vendor_add_form_fields', 'custom_add_vendor_fields', 2, 1 ); | |
function custom_add_vendor_fields( $taxonomy ) { | |
?> | |
<div class="form-field"> | |
<label for="vendor_website"><?php _e( 'Vendor website' ); ?></label> | |
<input type="text" name="vendor_data[website]" id="vendor_website" class="vendor_fields" /><br/> | |
<span class="description"><?php _e( 'The vendor\'s website.' ); ?></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
location ~* ^/podcast-download/ { | |
try_files $uri $uri/ | |
fastcgi_index /index.php; | |
include fastcgi_params; | |
fastcgi_pass 127.0.0.1:9000; | |
} | |
location ~* ^/podcast-player/ { | |
try_files $uri $uri/ | |
fastcgi_index /index.php; |
NewerOlder