... | ... | @@ -144,6 +144,26 @@ Ao iniciar um novo projeto, aplicar o seguinte [htacess](Wordpress/Htaccess) |
|
|
- Desenvolva funcionalidades do tema criando novos typepost programando ou utilize o Custom Post Type UI.
|
|
|
- Estruture tudo dentro de pastas com a estrutura nomenclatura fácil de entender e achar os arquivos.
|
|
|
|
|
|
## Cache
|
|
|
Impelementar a seguinte função no ```functions.php``` sempre que um thema utilize o **"W3 Total Cache"**
|
|
|
```
|
|
|
function check_plugin_w3tc_state(){
|
|
|
if (is_plugin_active('w3-total-cache/w3-total-cache.php')){
|
|
|
//Limpa todo o cache do redis qundo faz algumas dessas açoes 'save, delete, trash'
|
|
|
add_action( 'save_post', 'flush_redis_save_post' );
|
|
|
add_action( 'delete_post', 'flush_redis_save_post' );
|
|
|
add_action( 'trash_post', 'flush_redis_save_post' );
|
|
|
add_action( 'wp_trash_post', 'flush_redis_save_post' );
|
|
|
function flush_redis_save_post()
|
|
|
{
|
|
|
w3tc_flush_all();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
add_action('admin_init', 'check_plugin_w3tc_state');
|
|
|
```
|
|
|
|
|
|
|
|
|
## Arquivos desnecessário devem ser deletados.
|
|
|
- /wp-config-sample.php
|
|
|
- /readme.html
|
... | ... | |