searchwp\admin\dashboard_widgets\statistics\days
Desde: 4.0.0
Sumário
Por padrão, o Widget de Estatísticas do Painel mostra as pesquisas populares dos últimos 30 dias. Use este hook para modificar esse padrão.
Parâmetros
| Tipo | Parâmetro | Padrão | Desde |
|---|---|---|---|
| Inteiro | $dias |
30 |
4.0.0 |
Exemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Exibir pesquisas populares dos últimos 7 dias
Altere o período de tempo considerado para as Estatísticas do Widget do Painel para 7 dias
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; | |
| } ); |

