WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Nio
    Member
    Posted 1 year 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!

    http://wordpress.org/extend/plugins/wp-plugin-info/

  2. Luigi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    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. Nio
    Member
    Posted 1 year ago #

    It works, thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic