This file contains 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
1,5,9,13,18,22,26,31,35,39,43,48,52,56 * * * * php /cambiar-por-tu-ruta/app/console mautic:segments:update | |
2,6,10,14,19,23,27,32,36,40,44,49,53,57 * * * * php /cambiar-por-tu-ruta/app/console mautic:campaigns:rebuild | |
3,7,11,16,20,24,28,33,37,41,46,50,54,58 * * * * php /cambiar-por-tu-ruta/app/console mautic:campaigns:trigger | |
4,8,12,17,21,25,29,34,38,42,47,51,55,59 * * * * php /cambiar-por-tu-ruta/app/console mautic:emails:send | |
0,15,30,45 * * * * php /cambiar-por-tu-ruta/app/console mautic:email:fetch | |
*/15 * * * * php /cambiar-por-tu-ruta/app/console mautic:webhooks:process | |
0 0 25 * * php /cambiar-por-tu-ruta/app/console mautic:iplookup:download | |
0 0 * * * php /cambiar-por-tu-ruta/app/console mautic:maintenance:cleanup --days-old=365 --dry-run |
This file contains 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
# Bloquear la enumeración de usuarios (username) | |
RewriteCond %{REQUEST_URI} ^/$ | |
RewriteCond %{QUERY_STRING} ^/?author=([0-9]*) | |
RewriteRule ^(.*)$ https://dominio.com/? [L,R=301] | |
# Fin de Bloquear la enumeración de usuarios |
This file contains 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
// Eliminar URL en los comentarios | |
add_filter('comment_form_default_fields','remove_url_comments'); | |
function remove_url_comments($fields) { | |
unset($fields['url']); | |
return $fields; | |
} |
This file contains 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
// Añadir un nuevo perfil de usuario en WordPress | |
add_role('escritor', __('Escritor'), | |
array( | |
'read' => true, // Permite leer | |
'create_posts' => true, // Permite crear posts | |
'edit_posts' => true, // Permite editar sus propios posts | |
) | |
); |
This file contains 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
define( 'WP_DEFAULT_THEME', 'chaplin' ); |
This file contains 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
// Modo mantenimiento con redirección a una página. | |
function asv_redirigir_login() { | |
global $pagenow; | |
if( !is_user_logged_in() && !is_page( 'mantenimiento/' ) && $page_now != "wp-login.php") { // Cambiar 'mantenimiento/' por el slug de la landing deseada | |
wp_redirect(home_url('/' . 'mantenimiento/')); // Cambiar 'mantenimiento/' por el slug de la landing deseada | |
exit; | |
} | |
} | |
add_action('template_redirect', 'asv_redirigir_login'); |
This file contains 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
// Enviar a los usuarios logueados a una página | |
add_filter('login_redirect', 'asv_login_redirect_page'); | |
function asv_login_redirect_page() { | |
if ( current_user_can( 'administrator' ) ) { | |
return '/wp-admin/'; | |
} | |
return '/intranet/'; | |
} |
This file contains 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
// Cambiar logo de la página de acceso a WordPress | |
add_filter( 'login_headerurl', 'asv_login_header_url' ); | |
function asv_login_header_url( $url ) { | |
return esc_url( home_url() ); | |
} | |
add_action( 'login_head', 'asv_login_logo' ); | |
function asv_login_logo() { | |
$dir = plugin_dir_url( __FILE__ ) . 'images'; | |
?> |
This file contains 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
function wp_maintenance_mode(){ | |
if(!current_user_can('edit_themes') || !is_user_logged_in()){ | |
wp_die('<center><h1>EN MANTENIMIENTO</h1><br>En este momento estoy trabajando en tareas de mantenimiento, será muy rápido... Una vez termine volverá la web a estar disponible.<br><br> Gracias por tu comprensión y perdón por las molestias.</center>'); | |
} | |
} | |
add_action('get_header', 'wp_maintenance_mode'); |
This file contains 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
#my-topbar{ | |
background: #6246ea; | |
color: #fffffe; | |
font-size:16px; | |
font-weight: bold; | |
top: 0px; | |
left: 0px; | |
width: 100% !important; | |
padding: 10px 0px; | |
text-align: center;} |