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 uninstall not called from WordPress exit */ | |
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) | |
exit (); | |
/* Delete all existence of this plugin */ | |
global $wpdb; |
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 | |
global $wpdb; | |
$keys = $wpdb->get_col( " | |
SELECT meta_key | |
FROM $wpdb->postmeta | |
WHERE meta_key NOT LIKE '\_%' | |
GROUP BY meta_key | |
ORDER BY meta_id DESC" | |
); |
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('pre_get_posts', 'wps_private_topics'); | |
/** | |
* Only display topics to admins and the author of that topic | |
* | |
* @access public | |
* @param mixed $query | |
* @return void | |
*/ |
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
// Credit to https://core.trac.wordpress.org/ticket/19587 | |
jQuery(document).ready(function($){ | |
// 1. when dropped in | |
$('div.widgets-sortables').bind('sortstop',function(event,ui){ | |
console.log('just dropped in'); | |
}); | |
// 2. do some stuff on load | |
console.log('onLoad'); | |
// 3. on action |
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(document).ready(function($) { | |
$('.selectize').selectize({ | |
plugins: ['drag_drop', 'remove_button'], | |
valueField: 'hex', | |
labelField: 'name', | |
searchField: 'name', | |
options: [ | |
{hex: '#61BD6D', name: 'Fern'}, | |
{hex: '#1ABC9C', name: 'Mountain Meadow'}, | |
{hex: '#54ACD2', name: 'Picton Blue'}, |
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 our custom filter | |
add_filter( 'posts_search', 'filter_search', 1, 2); | |
$posts_query = new WP_Query; | |
$posts = $posts_query->query($post_args); | |
// Remove our custom filter |
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 | |
// Schedule the CRON Job to purge all expired transients | |
if (!wp_next_scheduled('purge_popup_transients_cron')) { | |
/** | |
* wp_schedule_event | |
* | |
* @param - When to start the CRON job |
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('bbp_get_do_not_reply_address','my_bbp_no_reply_email'); | |
function my_bbp_no_reply_email(){ | |
return 'yournewemail@example.com'; | |
} |
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 | |
/** | |
* Outputs a readable number | |
* | |
* @access public | |
* @static | |
* @param mixed $n | |
* @return void | |
*/ | |
function readable_number($n) { |
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 | |
/** | |
* Creates a license code from verifing that the user purchased through Code Canyon | |
* | |
* @access public | |
* @static | |
* @return void | |
*/ | |
static function create_license() { |
OlderNewer