Alex King alexkingorg

View wp-post-content-tweet.php
1 2 3 4 5 6 7 8 9 10
<?php
 
function aktt_replace_tweet_content($posts) {
foreach ($posts as $post) {
if ($post->post_type == AKTT::$post_type && !empty($post->tweet)) {
$post->post_content = esc_url(AKTT::status_url($post->tweet->username(), $post->tweet->id()));
}
}
}
add_action('the_posts', 'aktt_replace_tweet_content', 11);
View google-spreadsheet-colors.js
1 2 3 4 5 6 7 8 9
function onEdit(e) {
setColors();
};
 
function setColors() {
var activeSheet = SpreadsheetApp.getActiveSheet();
var numRows = activeSheet.getMaxRows();
var numCols = activeSheet.getMaxColumns();
var row, cell, value;
View cf-favorites.php
1 2 3 4 5 6 7 8 9
<?php
/*
Plugin Name: Favorites
Plugin URI:
Description: Let users save posts/pages as favorites - then access them through a quick menu.
Version: 1.0
Author: Crowd Favorite
Author URI: http://crowdfavorite.com
*/
View wp-page-tags.php
1 2 3 4 5 6 7 8 9 10
<?php
 
/*
Plugin Name: CF Page Tags
Plugin URI: http://crowdfavorite.com/wordpress/
Description: Add the tags form to pages in WP.
Author: Crowd Favorite
Author URI: http://crowdfavorite.com
Version: 1.0
*/
View wpdb-implode.php
1 2 3 4 5 6 7 8 9
<?php
 
$results = $wpdb->get_results(
$wpdb->prepare("
SELECT ID, post_title, post_name, post_parent
FROM $wpdb->posts
WHERE post_parent IN (".implode(',', array_map('intval', $post_ids)).")
")
);
View wordpress-template.php
1 2 3 4 5 6 7 8 9 10
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme and one of the
* two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* For example, it puts together the home page when no home.php file exists.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
View wp-customer-posts-per-page.php
1 2 3 4 5 6 7 8 9 10
<?php
 
// add filter for front-end requests
if (!is_admin() && !is_feed()) {
add_filter('parse_request', 'my_add_posts_per_page');
}
 
// add our condition-checking filter
function my_add_posts_per_page() {
add_filter('pre_get_posts', 'my_posts_per_page');
View register-all-postmeta.php
1 2 3 4 5 6 7 8 9 10
<?php
 
global $wpdb;
 
$keys = $wpdb->get_col("
SELECT DISTINCT meta_key
FROM $wpdb->postmeta
");
 
foreach ($keys as $key) {
View spam-comment-script.txt
1 2 3 4 5
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the {internet|net|web} will be {much more|a lot more} useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any? {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe. Thanks.|
{It is|It's} {appropriate|perfect|the best} time to make some plans for the future and {it is|i
View column-view-default-hack.js
1 2 3 4
jQuery(function($) {
$('#menu-pages > a[href="edit.php?post_type=page"]')
.attr('href', 'edit.php?post_type=page&page=cf-admin-column-view-page');
})
Something went wrong with that request. Please try again.