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 | |
// Generates a SQL dump that imports a number of posts into the wp_posts table | |
set_time_limit(0); | |
$table_prefix = 'wp_'; | |
$max_posts = 50000; | |
$max_inserts_per_query = 50; | |
$file = dirname( __FILE__ ) . '/dump.sql'; |
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 | |
/* | |
Plugin Name: Basic Dummy Comments | |
Version: 0.1 | |
Plugin URI: https://github.com/aprea | |
Description: Creates a bunch of dummy comments | |
Author: Chris Aprea | |
Author URI: https://gist.github.com/aprea/9344578 | |
License: GPL v3 |
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 reset_array( &$value, $key ) { | |
$value = $value[0]; | |
} | |
function get_tables() { | |
global $wpdb; | |
$results = $wpdb->get_results( 'show tables from ' . DB_NAME, ARRAY_N ); | |
array_walk( $results, 'reset_array' ); | |
return $results; | |
} |
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 printf( 'User is%s logged in.', ( is_user_logged_in() ? '' : ' not' ) ); ?> |
NewerOlder