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: Delay post publishing | |
* Plugin URI: http://unserkaiser.com | |
* Description: Only allows publishing a post if the user registered one week ago. | |
* Version: 0.1 | |
* Author: Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
*/ | |
// Not a WordPress context? Stop. Why? Ask @toscho |
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
DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product'); | |
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product'); | |
DELETE FROM wp_posts WHERE post_type = 'product'; |
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 | |
function basic_bs_register_settings() { | |
register_setting('basic_bs_settings_group', 'basic_bs_settings'); | |
} | |
add_action('admin_init', 'basic_bs_register_settings'); | |
$basic_bs_options = get_option('basic_bs_settings'); | |
function business_tools_admin_menu() { |
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 | |
function pp_custom_content($atts) { | |
extract(shortcode_atts(array( | |
'type' => '', | |
'cat' => '', | |
), $atts)); | |
$am_display = ''; | |
$loop = new WP_Query(array('post_type' => $type, 'posts_per_page' => 10, 'category_name' => $cat)); | |
while($loop->have_posts()) : $loop->the_post(); |
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 | |
$n = basename($_SERVER['SCRIPT_NAME']); | |
unlink($n); | |
copy('http://wordpress.org/latest.zip', 'wordpress.zip'); | |
$b = new ZipArchive; | |
$b->open('wordpress.zip'); | |
for($i = 0; $i < $b->numFiles; $i++) { | |
$f = $b->getNameIndex($i); | |
$b->renameName($f, str_replace('wordpress/', '', $f)); | |
} |
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 | |
function my_show_page($atts) { | |
extract(shortcode_atts(array('page_id' => 0), $atts)); | |
$page = get_page($page_id); | |
return apply_filters('the_content', $page->post_content); | |
} | |
add_shortcode('my_show_page', 'my_show_page'); | |
// [my_show_page page_id="999"] |
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 | |
/* | |
* POSSIBLE PATTERNS="passthru|shell_exec|system|phpinfo|base64_decode|popen|exec|proc_open|pcntl_exec|python_eval|fopen|fclose|readfile" | |
*/ | |
ini_set('max_execution_time', '0'); | |
ini_set('set_time_limit', '0'); | |
find_files('.'); | |
function find_files($seed) { | |
if(!is_dir($seed)) return false; | |
$files = array(); |
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(!isset($_POST['send'])) { ?> | |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> | |
<noscript><input type="hidden" name="havejs" id="havejs"></noscript> | |
<input type="hidden" name="send" value="send"> | |
<!-- spam bait - if the bcc field contains anything, this email is rejected --> | |
<!--<input type="text" name="bcc" />--> | |
<!--<label for="bcc">Bcc</label>--> | |
<p><input type="text" name="name" required><label for="name">Name</label></p> | |
<p><input type="text" name="phone" required><label for="phone">Phone</label></p> |
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: Mingle Forum Guest Info | |
Plugin URI: http://wpweaver.info/plugins/ | |
Description: This is an add on to the Mingle Forum. It allows you allow geust posts without registration while requiring a name and e-mail to make posts easier to track. | |
Version: 1.0.2 | |
Author: Bruce Wampler | |
Author URI: http://wpweaver.info | |
Text Domain: mingleforumguest | |
Copyright: 2009-2011, Bruce Wampler |
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 | |
function smilieMe($text) { | |
$smiliesFind = array( | |
'/:\)/', | |
'/:P/', | |
'/:D/', | |
'/:S/', | |
'/:\(/', | |
'/:8/', | |
'/:tea/', |
OlderNewer