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
// Change select box options based on value from another select box | |
$(document).ready(function(){ | |
// If the user select a value from the select | |
$('#FIRST_SELECT').change(function(){ | |
// Get the selected value | |
var get_eveniment = $(this).val(); |
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
<? | |
echo '<h1>DirectAdmin</h1>'; | |
echo '<i>php -q /home/DIRECTADMIN_USERNAME/domains/DOMAIN/public_html/wp-cron.php</i>'; | |
echo '<hr>'; | |
echo '<h1>cPanel</h1>'; | |
echo '<i>php -q /home/CPANEL_USERNAME/public_html/wp-cron.php</i>'; |
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 | |
require_once 'wp-load.php'; | |
$wp_roles = new WP_Roles(); | |
$wp_roles->remove_role("YOUR_ROLE"); // author, editor, contributor | |
$names = $wp_roles->get_names(); | |
print_r($names); | |
?> |
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 | |
$headers = "MIME-Version: 1.0\r\n"; | |
$headers .= 'From: ' . get_bloginfo('admin_email') . "\r\n"; | |
$headers .= "Content-Type: text/html; charset=\"" . get_option('blog_charset') . "\"\n"; | |
$receiver = get_user_by('id', $receiver_id); | |
$giver = get_user_by('id', $giver_id); | |
$to = $receiver->user_email; | |
$subject = 'Subject'; |
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 | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept'); | |
?> |
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 | |
// This is the script I used to export my old blog out of WordPress and into a | |
// Jekyll friendly format. The first half exports posts, the second does pages. | |
// It's fairly specific to my needs, but maybe it'll be a good starting point | |
// for you. /RTH 2011-08-28 | |
// https://twitter.com/#!/marcoarment/status/59089853433921537 | |
date_default_timezone_set('America/Los_Angeles'); | |
$db = mysql_connect('host', 'username', 'pass') or die(mysql_error()); |
NewerOlder