WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
Feature suggestion: Show which posts have the table (5 posts)

  1. Mikko Saari
    Member
    Posted 2 years ago #

    I'd like to see a feature where the table edit page would show the posts and pages that have the table. That would make working with tables even easier than it is with this excellent plugin.

    Here's a quick and dirty fix to add this functionality to the plugin, perhaps that'll help:

    http://pastebin.com/RBQJmtge

    This goes to /views/view-edit.php, I've left in some context in the top to help figure out where.

    Any chance of having this a standard feature of the plugin? It would be most helpful.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thank you for that suggesion. I really like the idea!

    Great that you also provided code for this! I'll gladly check it out and test it.
    If it works reliably, I will then consider to add it to WP-Table Reloaded of course!

    Thanks a lot again!
    Tobias

  3. Mikko Saari
    Member
    Posted 2 years ago #

    I'm not sure if the way the posts are fetched is ideal; probably a good idea make this optional, because it can be a problem for folks with large databases of posts.

    Also, currently the code only supports shortcodes in form of [table id=X] and [table id="X"], it should probably also understand [table id='X'].

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    yes, this seems to be a drawback, indeed.
    It would probably be better to include the search for the Shortcode in the database query, instead of doing it afterwards with PHP. Something like that is used in the integration of the WordPress search already.
    Also, doing direct database queries is not really a nice solution I think. Maybe this can also be achieved through an existing WordPress API function, like get_posts() or similar?

    Regards,
    Tobias

  5. Mikko Saari
    Member
    Posted 2 years ago #

    Yes, that's probably a good idea. This was cooked up in ten minutes or so, so I'm sure it's not the best way to do it, just a test that it's possible.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic