searchwp\admin\dashboard_widgets\statistics\days
Da: 4.0.0
Indice
Per impostazione predefinita, il widget Statistiche della dashboard mostra le ricerche più popolari degli ultimi 30 giorni. Usa questo hook per modificare tale impostazione predefinita.
Parametri
| Tipo | Parametro | Predefinito | Da |
|---|---|---|---|
| Intero | $giorni |
30 |
4.0.0 |
Esempi
All hooks should be added to your custom SearchWP Customizations Plugin.
Visualizza le ricerche più popolari degli ultimi 7 giorni
Modifica l'intervallo di tempo considerato per le statistiche del widget della dashboard a 7 giorni
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Consider 7 days instead of 30 when displaying Statistics Dashboard Widget. | |
| add_filter( 'searchwp\admin\dashboard_widgets\statistics\days', function( $days ) { | |
| return 7; | |
| } ); |

