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: Custom Post Type Capabiltiies Test | |
Plugin URI: http://wordpress.org/ | |
Description: Testing to see if a subscriber without edit_others capability can edit posts. | |
Author: Brent | |
Version: 1 | |
*/ | |
function ppt_register_post_type() { |
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
As found here: http://sandbox.angelleye.com/temp/sample-set.php | |
SetExpressCheckout Request | |
[USER] => xxxx | |
[PWD] => xxx | |
[SIGNATURE] => xxx | |
[VERSION] => 57.0 | |
[BUTTONSOURCE] => AngellFreeInc_USBSwiper_EC_US | |
[METHOD] => SetExpressCheckout |
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
/** | |
* Unobtrusively gets the IDs of all posts in the current query, not just the posts shown on the current page. | |
* | |
* @author Brent Shepherd <brent@findingsimple.com> | |
* @since 1.0 | |
*/ | |
function eg_get_all_posts_in_query() { | |
global $wp_query; | |
// Turn paging off & specify that we only want post IDs |
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
/** | |
* Replaces "Post" in the update messages for custom post types on the "Edit" post screen. | |
* | |
* For example, for a "Product" custom post type, "Post updated. View Post." becomes "Product updated. View Product". | |
* | |
* @param array $messages The default WordPress messages. | |
*/ | |
function pico_custom_update_messages( $messages ) { | |
global $post, $post_ID; |
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
/(\<[^\>]+\>)([^\<]+)(\<\/[^\>]+\>)?/ |
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
$pattern = '/([^a-zA-Z0-9-_>\[])(' . preg_quote( $given_term ) . ')([^a-zA-Z0-9-_<\]])(?!([^<]*)(\>|\<\/a|\]|<\/h\d\>))/i' |
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
(_e\(\s*'[^']*')(\s*)(?=\))(\)) | |
(__\(\s*'[^']*')(\s*)(?=\))(\)) | |
Or do them in both, also account for strings using "" instead of just '': | |
(_[e|_]\(\s*['|"][^,'"]*['|"])(\s?)(?=\))(\){1}) |
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 | |
foreach ( debug_backtrace() as $key => $value ) { | |
$function = @$value['function']; | |
if( isset( $value['class'] ) ) | |
$function = $value['class'] . '::' . $function; | |
//error_log( "** " . $key . ". " . $function . "( " . str_replace( array("\n","\t",' ','(',')'), '', print_r( $value['args'], true ) ) . " )" ); |
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 SUM(LENGTH(`post_content`) - LENGTH(REPLACE(`post_content`,' ',''))+1) | |
FROM `wp_posts` |
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
------------------------------------- | |
PayPal Standard Subscription Sign-up | |
------------------------------------- | |
[txn_type] => subscr_signup | |
[subscr_id] => I-NARPL1C0KAHA | |
[last_name] => User | |
[residence_country] => US | |
[mc_currency] => AUD | |
[item_name] => Digital Subscription |
OlderNewer