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 | |
/** | |
* Plugin Name: an-injected-network-site-option | |
* Description: Site option example of injecting new section and fields into existing sm_options_page or sm_options_container from the fansided-vip plugin | |
* Plugin URI: https://github.com/fansided | |
* Author: sethcarstens | |
* Author URI: https://fansided.com | |
* Version: 0.0.1 | |
* Text Domain: fs | |
* License: GPLv2 or later |
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 ( !empty( $_SERVER['HTTP_HOST'] ) ) { | |
$site = get_site_by_path( strtolower( $_SERVER['HTTP_HOST'] ), '/'); | |
define( 'COOKIE_DOMAIN', '.' . $site->domain ); | |
} |
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('widget_text', 'do_shortcode'); | |
?> |
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 my_enqueue($hook) { | |
if( 'users.php' != $hook && 'user-meta-manager' != $_GET['page']) | |
return; | |
wp_enqueue_script( 'jquery-ui-sortable'); | |
} | |
add_action( 'admin_enqueue_scripts', 'my_enqueue' ); |
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
//force user login, regardless of post type | |
//UNLESS public is in the URL | |
add_action('parse_request', 'rr_login_redirect'); | |
function rr_login_redirect() { | |
global $wp; | |
if(stristr($wp->request,'public/') || stristr($wp->request,'/public')){} | |
elseif (!is_user_logged_in()) { | |
auth_redirect(); | |
} | |
} |
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 / Action to enable choosing private pages as parent pages | |
*/ | |
function admin_private_parent_metabox($output) | |
{ | |
global $post; | |
$args = array( | |
'post_type' => $post->post_type, |
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 sortObjectBy(property) { | |
var sortOrder = 1; | |
if(property[0] === "-") { | |
sortOrder = -1; | |
property = property.substr(1, property.length - 1); | |
} | |
return function (a,b) { | |
var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0; | |
return result * sortOrder; | |
} |
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 get_base_website_url() { | |
if (!window.location.origin) | |
return window.location.origin = window.location.protocol+"//"+window.location.host; | |
else | |
return window.location.origin; | |
} |
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
<table border="0" cellpadding="0" cellspacing="0" width="400"> | |
<tbody> | |
<tr height="10"> | |
<td height="10" colspan="2"><hr style="height: 1px; border: 0; border-bottom: 1px dashed #ccc; padding: 0; margin: 12px 0 5px 0;" /></td> | |
</tr> | |
<tr style="vertical-align: middle;" height="100"> | |
<td height="100" width="250" style="border-right: 1px dashed #ccc;"><strong>Seth Carstens</strong><br> | |
Rapid Recovery<br> | |
<a href="tel:8773727732">877-372-7732</a> office<br> | |
<a href="tel:4802033753">480-203-3753</a> cell<br> |
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
<apex:page standardStylesheets="false" showHeader="false" sidebar="false"> | |
<apex:stylesheet value="{!URLFOR($Resource.WorkBookStyles, 'styles.css')}" /> |