Italian (Italy)
Knowledge Base  >  VikUpdater  >  Sviluppatori  >  Plugin  >  Before Display Info

do_action( 'vikupdater_before_display_plugin_info', object $info, object $manifest, array $options )

Action used to manipulate the plugin info before displaying them.


Description

The plugin information are taken whenever an administrator clicks on the "View Details" button of a plugin. This action will open a sort of modal that loads remote contents from the URL specified during the subscription of the plugin.

Any changes applied to the $info argument will be automatically reflected into the layout used by WordPress to display the information of the selected plugin.


Parameters

$info

(object)  The object holding the plugin details, compatible with the WordPress requirements.

$manifest

(object)  The plugin manifest (JSON-decoded) fetched through the API call made on the plugin "check" URL.

$options

(array)  A configuration array, taken from the associative array specified during the subscription of the plugin.


Example

The example below explains how to add a custom tab to the details view of a plugin.

function your_plugin_vikupdater_before_display_info( $info, $manifest, $options ) {
    // make sure we are observing our plugin
    if ( 'your-plugin' !== $info->slug ) {
        return;
    }

    // register the "License" tab
    $info->sections[ __('License', 'your-plugin') ] = '<p>' . __('The license information goes here...', 'your-plugin') . '</p>';
}

add_action( 'vikupdater_before_display_plugin_info', 'your_plugin_vikupdater_before_display_info', 10, 3 );

Changelog

Version Description
2.0 Introduced.
Ultimo aggiornamento: 2023-11-21
Utile?

Questo sito web utilizza i cookie

Questo sito web utilizza cookie e tecnologie simili. Alcune di queste tecnologie sono necessarie per il corretto funzionamento del sito web (essenziali). Altre tecnologie sono utilizzate per valutare il comportamento degli utenti (analisi), per integrare media esterni o per scopi pubblicitari. Se l'utente accetta, queste tecnologie vengono attivate. I dettagli sono riportati nella Privacy Policy. Da questa stessa pagina è inoltre possibile aggiornare/revocare il consenso. Se non si fornisce il consenso, verranno attivati solo i cookie con funzioni essenziali.

Sul nostro sito web utilizziamo tecnologie provenienti dagli Stati Uniti. Pertanto, se acconsentite, acconsentite anche al trasferimento dei vostri dati negli Stati Uniti. Desideriamo sottolineare che gli Stati Uniti non hanno un livello di protezione dei dati paragonabile a quello dell'Unione Europea e che qualsiasi azienda statunitense può essere obbligata dalle autorità statali a consegnare i vostri dati senza che voi abbiate alcuno strumento efficace di protezione legale contro questo.