WP Plugin Info
[resolved] Does it work in sidebar? (3 posts)

  1. Nick Forest
    Posted 3 years ago #

    I'm trying to use this code in the sidebar but it only returns the "-"
    Version: <?php wp_plugin_info( 'facebook', 'version' ); ?>

    facebook = plugin_id for Facebook plugin

    Please give me an example to understand how to set the "plugin_id" correctly.
    Thank you!


  2. Luigi
    Plugin Author

    Posted 3 years ago #


    there was an error in the documentation: the first argument is the identifier of the info you want to retrieve ($info_id).

    Your code should look like this:
    Version: <?php wp_plugin_info( 'version', array('plugin_id' => 'facebook') ); ?>

    If you set the constant WPPI_PLUGIN_ID to 'facebook', you can omit the second argument.

  3. Nick Forest
    Posted 3 years ago #

    It works, thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Plugin Info
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic