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 | |
// Acción para registrar el widget en el dashboard | |
add_action('wp_dashboard_setup', 'ibp_add_sudo_role_dashboard_widget'); | |
function ibp_add_sudo_role_dashboard_widget() | |
{ | |
wp_add_dashboard_widget( | |
'ibp_sudo_role_dashboard_widget', // ID del widget | |
'Sudo Role', // Título del widget |
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
#Crear una network para que se puedan comunicar entre los dockers | |
docker network create nginx_network |
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 | |
/** | |
* Hook para agregar sitemaps personalizados al sitemap_index.xml de Yoast. | |
* | |
* @param string $sitemap_index El contenido del índice del sitemap de Yoast. | |
* @return string El índice del sitemap modificado. | |
*/ | |
function ibp_agregar_sitemaps_personalizados( $sitemap_index ) { | |
// Obtener las URLs de los sitemaps personalizados a través de un filtro. | |
$sitemap_urls = apply_filters( 'ibp_sitemaps_urls', array() ); |
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 | |
/** | |
* Ordenar los posts por la fecha de última modificación en el admin para todos los CPT. | |
* | |
* @param WP_Query $query Objeto de la consulta. | |
*/ | |
function ibp_order_cpts_by_modified_date( $query ) { | |
// Verificar si es el área de administración y la consulta principal. | |
if ( is_admin() && $query->is_main_query() ) { |
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 | |
// Eliminar la columna de "Entradas" en la tabla de usuarios y agregar una nueva columna con enlaces a los CPTs | |
add_filter('manage_users_columns', 'ibp_remove_and_add_custom_posts_column'); | |
add_filter('manage_users_custom_column', 'ibp_add_custom_posts_column_content', 10, 3); | |
// Función para eliminar la columna de "Entradas" predeterminada y añadir una nueva | |
function ibp_remove_and_add_custom_posts_column($columns) { | |
// Permitir personalización de las columnas existentes antes de modificar | |
$columns = apply_filters('ibp_before_modify_users_columns', $columns); |
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 | |
/** | |
* Función principal que busca enlaces externos que no apunten a dominios permitidos y los guarda en un archivo CSV. | |
* | |
* @param string $output_file El archivo donde se guardarán los enlaces externos. | |
* @param array $allowed_domains Lista de dominios permitidos. | |
*/ | |
function ibp_check_external_links( $output_file = 'external_links.csv', $allowed_domains = [] ) { | |
global $wpdb; |
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 | |
/** | |
* Crea una redirección utilizando Red_Item y permite modificar su comportamiento mediante hooks. | |
* | |
* @param string $source URL de origen. | |
* @param string $target URL de destino. | |
* @param bool $regex Define si se usa regex en la redirección. | |
* @param int $group_id ID del grupo de redirecciones. | |
* @param int $status_code Código HTTP (301 o 302). | |
* @return string Resultado de la operación. |
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 | |
add_action('init', function () { | |
if (function_exists('gdpr_cookie_is_accepted')) : | |
if (gdpr_cookie_is_accepted('thirdparty')) : | |
//Aquí va el código a ejecutar |
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
.chosen-container-single .chosen-single { | |
border: 0; | |
box-shadow: none; | |
background: 0; | |
} | |
.chosen-container { | |
font-size: 15px; | |
} |
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
//https://ivanbarreda.com/wptv-shortcode/ | |
/* | |
Guide of css elements in plugin | |
.wptv_novideos | |
.wptv_container |
NewerOlder