10

How do I get the [View details] link to appear on the Plugin admin page in the Description area?

The plugin is working fine, the version and authors (with links) show up fine, but no [View details] like most other plugins.

Perhaps I'm asking the wrong question, but I'm working on a plugin and I would like to show the readme.txt and screenshots like I see in so many plugins. How do I get this link to appear and show the contents of the readme.txt file?

I've been reading through Professional WordPress Plugin Development, but I can't find this reference. I can refer to an external URI, but I would like the nice and concise panel that shows on other plugins.

0
8

The 'View details' link in the installed plugins list table is only shown for plugins that are hosted in the WordPress.org plugin repository. If you take a look at the source for WP_Plugins_List_Table->single_row(), you'll see that the details link is only generated if there's API data present, e.g. the slug is set:

// Details link using API info, if available
if ( isset( $plugin_data['slug'] ) && current_user_can( 'install_plugins' ) ) {
    $plugin_meta[] = sprintf( '<a href="%s" class="thickbox" aria-label="%s" data-title="%s">%s</a>',
        esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] .
            '&TB_iframe=true&width=600&height=550' ) ),
        esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ),
        esc_attr( $plugin_name ),
        __( 'View details' )
    );
} elseif ( ! empty( $plugin_data['PluginURI'] ) ) {
    $plugin_meta[] = sprintf( '<a href="%s">%s</a>',
        esc_url( $plugin_data['PluginURI'] ),
        __( 'Visit plugin site' )
    );
}
0

You didn't mention if your plugin is/isn't hosted on WordPress.org, neither if you installed the plug-in from WordPress Plugin Directory or just a local ZIP copy of it (which is the equivalent of a private-hosted plug-in).

As already answered earlier the "View details" link appears only for the plugins which has the slug hosted at WordPress.org.

I just want to emphasize that there are situations when you may not see the "View details" even for a plug-in which is in fact hosted by WordPress.org.

How? In which situation?

Example: just imagine that your plug-in is hosted by them but actually you didn't installed the plugin from WordPress Plugin Directory, instead you installed a local ZIP file (a fresh copy of it while testing a new fix/tweak for instance).

In my example above the installed copy represents the same plug-in but is not installed from WordPress Plugin Directory. It was installed from a local ZIP file which is the equivalent of private-hosted plug-in.

0

If you rename the folder that the plugin files are contained in... WordPress will use your Plugin URI stated in the header of the main plugin file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.