View deloldtweets.py
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
#!/bin/python3 | |
# Largely copied from http://www.mathewinkson.com/2015/03/delete-old-tweets-selectively-using-python-and-tweepy | |
# However, Mathew's script cannot delete tweets older than something like a year (these tweets are not available from the twitter API) | |
# This script is a complement on first use, to delete old tweets. It uses your twitter archive to find tweets' ids to delete | |
# How to use it : | |
# - download and extract your twitter archive (tweet.js will contain all your tweets with dates and ids) | |
# - put this script in the extracted directory | |
# - complete the secrets to access twitter's API on your behalf and, possibly, modify days_to_keep | |
# - delete the few junk characters at the beginning of tweet.js, until the first '[' (it crashed my json parser) | |
# - review the script !!!! It has not been thoroughly tested, it may have some unexpected behaviors... |
View gist:146c6f90bc8194c7dba1
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 | |
/** | |
* Filters get_post_meta() to ensure old commission status checks don't fail | |
* | |
* The status for commission records used to be stored in postmeta, now it's stored in a taxonomy | |
* | |
* @access private | |
* @since 2.8 | |
* @return mixed |
View gga-set-featured-image-from-url.php
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 gga_set_featured_image_from_url($post_id, $url) { | |
$temp_file = download_url( $url ); | |
if (is_wp_error( $temp_file )) | |
return $temp_file; | |
$file_array['name'] = basename( $url ); | |
$file_array['tmp_name'] = $temp_file; | |
$sideloaded_id = media_handle_sideload( $file_array, $post_id ); |
View plugin.php
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 | |
/** | |
* Don't Update Plugin | |
* | |
* This prevents you being prompted to update if there's a public plugin | |
* with the same name. | |
* | |
* @since 1.0.0 | |
* @author Mark Jaquith |
View functions.php
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 | |
// Grab Authorized Users | |
$admins = new WP_User_Query( array( 'role' => 'bbp_keymaster', 'fields' => 'ID' ) ); | |
$moderators = new WP_User_Query( array( 'role' => 'bbp_moderator', 'fields' => 'ID' ) ); | |
$users = array_merge( $admins->results, $moderators->results ); | |
// Build the bbPress query | |
// ... |
View wp-config.php
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 | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
View wp-prep.php
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 | |
/** | |
* WordPress Prep. | |
* | |
* Based from the WordPress Downloader | |
* http://www.farinspace.com/wordpress-downloader/ | |
* | |
* @package wordpress-prep | |
* @version 1.0.1 | |
* @author Jared Atchison |
View wp-config.php
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 | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
View big-bgs.php
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 | |
/** | |
* Full-size Backgrounds using a Post Type of Background | |
* | |
* Function that selects a custom post type 'background'. | |
* Uses the Post Thumbnail as the background image. | |
* On the Page template(s) where it's needed, call s25_full_bg. | |
* | |
*/ | |
function s25_full_bg() { |
NewerOlder