WordPress.org

Ready to get started?Download WordPress

Forums

Football Pool
[resolved] 2.3.0 + wp3.6.1 breaks "Featured Image" on posts (5 posts)

  1. CornelB
    Member
    Posted 10 months ago #

    Tried on Two separate WP installations.

    http://wordpress.org/plugins/football-pool/

  2. AntoineH
    Member
    Plugin Author

    Posted 10 months ago #

    Hi, thanks for the feedback. I'll look into it tonight.

  3. AntoineH
    Member
    Plugin Author

    Posted 10 months ago #

    I found the problem. For some reason a call to wp_enqueue_media breaks the functionality on the posts page. According to a previous fix in WordPress this shouldn't happen anymore (see this and this), but it does and I don't know why and if this is still a bug or if I am doing something wrong. I have to do some more research on this.

    But a quick and dirty fix for this is to limit the plugin code to only the pages where the plugin needs the media uploader.

    Change file classes\class-football-pool.php lines 344-346 to:

    if ( FOOTBALLPOOL_WP_MEDIA ) {
    	global $pagenow;
    	if ( $pagenow == 'admin.php' ) wp_enqueue_media();
    } else {
  4. CornelB
    Member
    Posted 10 months ago #

    Thanks.

    Also, if i could suggest some hooks/ filters to widgets / pages / all htmnl output ...

    I mean, there are things i'd like changed, and right now i'm monkey-pathing / overwriting some classes to do that...

    $widget_html = apply_filters('football_pool_widget_type_xxx',$widget_html);
    echo $widget_html;
    
    $page_content = apply_filters('football_pool_page_type_xxx',$page_content);
    return $page_content;

    and so on ...

  5. AntoineH
    Member
    Plugin Author

    Posted 10 months ago #

    I released an update (v2.3.1) with a fix for the featured image bug.

    I have almost no experience with hooks/filters. So I will have to do some research on the subject, but I'll look into it for a future version.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.