Austin Matzko
Forum Replies Created
-
Forum: Plugins
In reply to: strip_tags(the_content(‘More’), ‘<a><strong>’);You want
get_the_contentinstead ofthe_content.Forum: Plugins
In reply to: get_children returning deleted attachmentsif i remove the images from the post,
When you say “remove,” do you mean you have deleted them from that post’s gallery or just that they don’t appear in the body of the post? Because the former is what really deletes them.
Forum: Plugins
In reply to: How to exclude a post from the loopquery_posts(array('post__not_in' => array(123)));excludes post ID 123.
Forum: Fixing WordPress
In reply to: Show Specific post?Change it to
<?php $recent = new WP_Query("p=123");
where 123 is the post’s id.Forum: Plugins
In reply to: Related Posts?The
wp32_related_postsfunction belongs to this plugin: http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/You will have to install that plugin for that function to work, but there are also other related posts plugins for WordPress.
Forum: Fixing WordPress
In reply to: mysql Server crashes during import a “_option” tableWhat is that ??? Where is that record is coming from ?? I’ve never heart or written somehing like that.
On the “Dashboard,” WordPress displays sites that link to your blog (or that Google thinks link to your site). What you are seeing is that information cached in the database.
Forum: Fixing WordPress
In reply to: Post Offsets?Forum: Fixing WordPress
In reply to: 2.7 and Invalid Comment FeedsThis is a known bug: http://trac.wordpress.org/ticket/8405
It looks like you’re missing the
wp-admin/includes/comment.phpfile or it was corrupted. Try uploading it again.Forum: Requests and Feedback
In reply to: Pointers for new plugin writerHow can my plugin tell when a new trackback has been received?
What I would do is hook into the ‘comment_post’ action hook:
function check_for_special_pingbacks($comment_id = 0, $comment_approval = 0) { $comment = get_comment($comment_id); if ( ! empty( $comment ) && in_array($comment->comment_type, array('trackback', 'pingback')) && preg_match('/some pattern matching desirable urls/', $comment->comment_author_url) ) { wp_set_comment_status($comment_id, 'approve'); } } add_action('comment_post', 'check_for_special_pingbacks', 10, 2);Forum: Fixing WordPress
In reply to: get_search_form(); is more heavier?If
searchform.phpexists,get_search_form()will use it; otherwise it uses its own text.So it’s probably better to use
get_search_form()as it provides hooks that plugin authors can take advantage of.Forum: Requests and Feedback
In reply to: Feed not validatingMake some posts so that there’s actually something to appear in the feed.
Forum: Plugins
In reply to: wp_schedule_event events don’t fireIn ashes999 defense, the inline docs do say
@param callback $hook Function or method to call, when cron is run.which is wrong, and oddly is corrected on the Codex version.
At any rate, I’ve made a patch.
Forum: Everything else WordPress
In reply to: MySQL query / Need list of subcategoriesThat should work. Try var_dump($children); to see if anything’s being returned.
Forum: Plugins
In reply to: Correct usage of add_rewrite in pluginFirst of all, don’t flush your rewrite rules every time you initialize WordPress—that’s some seriously unnecessary server resources being eaten up. Just flush when you activate the plugin or otherwise make changes to the rewrite rules.
Second, the problem is that add_rewrite_rule needs to come before you flush the rules. I know it seems unintuitive, but what happens when you flush the rules is that they’re immediately regenerated, at which point WordPress says, “hmm, what rewrite rules do I need to include?” It doesn’t see yours yet, because add_rewrite_rule hasn’t yet been called, so it regenerates the rules without it.
So use wftp_rewrite() as in the first example, but call
$wp_rewrite->flush_rules()last and only call wftp_rewrite() when options have been saved or the plugin is first activated.