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 | |
## script migration flutter a Magic fields | |
## version: 0.1.1 | |
## author: Edgar G (hunk) ing.edgar@gmail.com | |
## this script is for migrate of flutter 1.1 to Magic Fields 1.3.1 | |
## magicfields.org hunk.com.mx | |
include('wp-config.php'); | |
include('wp-load.php'); | |
global $wpdb; |
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
<select name="country"> | |
<?php | |
$curCountry = (isset($_POST['country'])) ? $_POST['country'] : ''; | |
$countries = array('US'=>'United States','CA'=>'Canada','AF'=>'Afghanistan','AL'=>'Albania','DZ'=>'Algeria','AS'=>'American Samoa','AD'=>'Andorra','AO'=>'Angola','AI'=>'Anguilla','AQ'=>'Antarctica','AG'=>'Antigua and Barbuda','AR'=>'Argentina','AM'=>'Armenia','AW'=>'Aruba','AU'=>'Australia','AT'=>'Austria','AZ'=>'Azerbaijan','BH'=>'Bahrain','UM'=>'Baker Island','BD'=>'Bangladesh','BB'=>'Barbados','BY'=>'Belarus','BE'=>'Belgium','BZ'=>'Belize','BJ'=>'Benin','BM'=>'Bermuda','BT'=>'Bhutan','BO'=>'Bolivia','BA'=>'Bosnia and Herzegovina','BW'=>'Botswana','BV'=>'Bouvet Island','BR'=>'Brazil','IO'=>'British Indian Ocean Territory','VG'=>'British Virgin Islands','BN'=>'Brunei','BG'=>'Bulgaria','BF'=>'Burkina Faso','MM'=>'Burma','BI'=>'Burundi','KH'=>'Cambodia','CM'=>'Cameroon','CV'=>'Cape Verde','KY'=>'Cayman Islands','CF'=>'Central African Republic','TD'=>'Chad','CL'=>'Chile','CN'=>'China','CX'=>'Christmas Island','CC'=> |
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
WP Bag of Tricks | |
1. Helpful Scripts/Plugins: | |
Hacks: | |
http://wordpress.org/extend/plugins/tac/ | |
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.) | |
http://wordpress.org/extend/plugins/wp-malwatch/ |
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
/* | |
Makes WordPress' PressThis use vimeo short code instead of <object>/<embed> tags. | |
Add this to the WordPress theme's function.php file. | |
Addresses the Vimeo question from StackExchange here: | |
http://webapps.stackexchange.com/questions/3834/customizing-press-this-quick-posting-for-wordpress | |
*/ | |
add_action('admin_print_footer_scripts','greatjakes_admin_print_footer_scripts'); | |
function greatjakes_admin_print_footer_scripts() { | |
if ($_SERVER['PHP_SELF']=='/wp-admin/press-this.php') { | |
$script=<<<SCRIPT |
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
<select> | |
<option value='7840'>Abkhazia (+7 840)</option> | |
<option value='7940'>Abkhazia (+7 940)</option> | |
<option value='99544'>Abkhazia (+995 44)</option> | |
<option value='93'>Afghanistan (+93)</option> | |
<option value='355'>Albania (+355)</option> | |
<option value='213'>Algeria (+213)</option> | |
<option value='1684'>American Samoa (+1 684)</option> | |
<option value='857'>ANAC Satellite (+857)</option> | |
<option value='858'>ANAC Satellite (+858)</option> |
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 | |
/* | |
PostsByTaxonomy class that extends WP_Query and filters to includes all posts that have any term of a taxonomy. | |
Author: Mike Schinkel (http://mikeschinkel.com) | |
This example works, just drop into the root of your website and call directly. | |
Use the class in your plugins or themes. | |
See: |
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 | |
/* | |
PostsOrderedByMetaQuery class that extends WP_Query and sorts posts meta_key | |
Author: Mike Schinkel (http://mikeschinkel.com) | |
This example works, just drop into the root of your website and call directly. | |
Use the class in your plugins or themes. | |
See: http://stackoverflow.com/questions/4111255/how-to-sort-a-query-posts-function-by-custom-field-while-limiting-posts-by-ano |
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: Taxonomy Map | |
Plugin URI: http://wordpress.mfields.org/plugins/taxonomy-images/ | |
Description: Use a hierarchical taxonomy system to display Goole map. | |
Version: 0.1 | |
Author: Michael Fields | |
Author URI: http://wordpress.mfields.org/ | |
License: GPLv2 |
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 | |
global $user_identity; | |
//$user_submissions = get_posts(); | |
if ($user = wp_get_current_user()) { | |
$author = array('id' => $user->ID); | |
} else { | |
$commenter = wp_get_current_commenter(); | |
$author = array( | |
'author' => $commenter['comment_author'], |
OlderNewer