andrewkhunn
Forum Replies Created
-
Forum: Plugins
In reply to: Passing $post_ID to wp_mail(), please help!Latest iteration that’s not working:
if (!function_exists('email_notification')) { function email_notification($post_ID) { global $wpdb; $post_ID = $post->ID; if (function_exists('similar_posts')) { ob_start(); similar_posts(); $email_notification_similar = "<h3>Similar Posts</h3>".ob_get_contents(); $email_notification_similar = preg_replace('<code>[\r\n]+</code>', '', $email_notification_similar); ob_end_clean(); } $email_notification_to = "[email protected]"; $email_notification_subject = "New Article at ".get_bloginfo('name'); $email_notification_message = "This is an automated message notifying you that there has been a new article posted at ".get_bloginfo('name').".\n\nTitle: ".the_title('', '', FALSE)."\nAuthor: ".get_the_author()."\nURL: ".get_permalink()."\n\nPlease copy/paste the following HTML (the code in between the \"<!-- article -->\" and \"<!-- /article -->\" tags) into your web publishing software:\n\n\n\n<!-- article -->\n\n".wpautop(wptexturize(get_the_content()))."<blockquote><small>\n".$email_notification_similar."\n<p>This article is © ".$copyright." by <a href=\"".$blog_owner_url."\" target=\"_blank\">".$blog_owner."</a> and was originally published at <a href=\"".get_permalink()."\" target=\"_blank\">".get_bloginfo('name')."</a>. This article may not be copied, distributed, or transmitted without attribution. Additionally, you may not use this article for commercial purposes or to generate derivative works without explicit written permission. Please <a href=\"mailto:".get_bloginfo('admin_email')."?subject=License%20Request%20for%20".str_replace(' ', '%20', the_title('','',FALSE))."\">contact us</a> if you wish to license this content for your own use.</p>\n</small></blockquote>\n\n<!-- /article -->\n\n\n\nLet us know if you have any questions or comments.\n\nThanks!\n\n-- \n\nMe\nWebsite\[email protected]"; wp_mail($email_notification_to, $email_notification_subject, $email_notification_message); } } add_action('new_to_publish', 'email_notification'); add_action('draft_to_publish', 'email_notification'); add_action('pending_to_publish', 'email_notification'); add_action('future_to_publish', 'email_notification');
Forum: Plugins
In reply to: Passing $post_ID to wp_mail(), please help!Anyone?
All you have to do is rename the plugin file on your server and WordPress will automatically disable it so you can login again.
Forum: Fixing WordPress
In reply to: Comment Author Link in New WindowSolved. I just needed to change:
return apply_filters('get_comment_author_link_new', $return);
to
return $return;
Forum: Fixing WordPress
In reply to: Order “Manage Pages” by NameJust for future reference, I finally found the code I needed to manipulate to get this working right:
wp-admin/edit-pages.php: line 22
wp('post_type=page&orderby=menuorder&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1&order=asc');
to
wp('post_type=page&orderby=title&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1&order=asc');
Forum: Plugins
In reply to: query_posts in 2.1?Holy crap. I was pulling my hair out.
Adhesive was indeed causing the issues. I thought it was 2.1-compatible. Guess I’ll wait for an update.
Thanks so much!
Forum: Fixing WordPress
In reply to: Order “Manage Pages” by NameI meant that the other way around. Sheesh.
Forum: Fixing WordPress
In reply to: Order “Manage Pages” by NameReplacing
post_title
withpost_name
does not fix the order. Already tried that. ??Forum: Fixing WordPress
In reply to: Order “Manage Pages” by NameHaving re-read your post for the third time now Michael, the display default is post_title further on down the code from the snippet I posted, but for some reason it is obviously not sorting by that in the administration panel itself.
Any other hints anyone?
Forum: Fixing WordPress
In reply to: Order “Manage Pages” by NameNo go.
Forum: Fixing WordPress
In reply to: Order “Manage Pages” by NameOh wait, are you saying just strip out the:
'sort_column=post_name'
and get_pages() should sort by name? I’ll try that real quick and see if it works.
Forum: Fixing WordPress
In reply to: Order “Manage Pages” by NameThat’s my altered attempt. The actual un-modified code is:
function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
global $wpdb, $class, $post;
if (!$pages )
$pages = get_pages( 'sort_column=menu_order' );
if (! $pages )
return false;Sorry for the confusion.