This file contains hidden or 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 showit( $stuff ) { | |
if( is_array( $stuff ) ) { | |
foreach( $stuff as $s ) | |
showit( $s ); | |
} else { | |
echo $stuff; | |
} | |
} |
This file contains hidden or 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
public static function facilitatorSelect( $name, $current, $special = false){ | |
if( $special ) { | |
$id = 'saved_organizer'; | |
} else { | |
$id = str_replace(array('[',']'),'',$name); | |
} | |
$current_user = wp_get_current_user(); | |
$s = '<select class="chosen organizer-dropdown" name="' . esc_attr( $name ) . '" id="'.$id.'">'; | |
$s .= '<option value="0">' . __( 'Use New Facilitator' , 'tribe-events-calendar-pro' ) . '</option>'; |
This file contains hidden or 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 | |
class WotDataEntererListMetabox { | |
public function __construct() { | |
add_action( 'add_meta_boxes', array( &$this, 'add' ) ); | |
add_action( 'save_post', array( &$this, 'save' ) ); | |
} | |
public function add() { |
This file contains hidden or 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 insertAttachment($file_handler,$post_id,$setthumb='false') { | |
// check to make sure its a successful upload | |
//if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false(); | |
require_once(ABSPATH . "wp-admin" . '/includes/image.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/file.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/media.php'); | |
$attach_id = media_handle_upload( $file_handler, $post_id, array(), array( 'test_form' => false, 'test_upload' => false ) ); |
This file contains hidden or 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.post(ajaxurl, { | |
action: 'ajaxGetFacilitatorInfo', | |
org_id: org_id | |
}, function(data) { | |
jQuery('#eventRealOrganizerName').val( data.name ); | |
jQuery('#eventRealOrganizerEmail').val( data.email ); | |
jQuery('#eventRealOrganizerPhone').val( data.phone ); | |
jQuery('#eventRealOrganizerBusinessName').val( '' ); | |
}, |
This file contains hidden or 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 | |
// Grab the original options.php file | |
require_once( WOT_PLUGIN_DIR . '3rd-party/options.php' ); | |
add_filter( 'wot_options_page', 'wot_theme_add_options' ); | |
/** | |
* Add any custom fields that are required to the options framework |
This file contains hidden or 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 | |
/** | |
* A unique identifier is defined to store the options in the database and reference them from the theme. | |
* By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed. | |
* If the identifier changes, it'll appear as if the options have been reset. | |
* | |
*/ | |
function optionsframework_option_name() { |
This file contains hidden or 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 tweakjp_allow_cpt( $allowed_post_types ) { | |
// my_cpt is the name of your <span class="hilite">Custom</span> <span class="hilite">Post</span> <span class="hilite">Type</span> | |
$allowed_post_types[] = 'my_cpt'; | |
return $allowed_post_types; | |
} | |
add_filter( 'rest_api_allowed_post_types', 'tweakjp_allow_cpt' ); |
This file contains hidden or 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 tweakjp_custom_is_support() { | |
$supported = current_theme_supports( 'infinite-scroll' ) && ( is_home() || is_archive() || is_search() ); | |
return $supported; | |
} | |
add_filter( 'infinite_scroll_archive_supported', 'tweakjp_custom_is_support' ); |
This file contains hidden or 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: Serve from WordPress.com | |
Plugin URI: http://github.com/blobaugh/serve-from-wordpress-com | |
Description: Switches the URL on built-in WordPress javascript files to serve from WordPress.com rather than locally | |
Author: Ben Lobaugh | |
Version: 0.6 | |
Author URI: http://ben.lobaugh.net | |
*/ |
OlderNewer