/* =============================COLUMNAS ADMIN AUDIENCIAS ========================================== */ add_filter( 'manage_edit-audiencias_columns', 'my_edit_audiencias_columns' ) ; function my_edit_audiencias_columns( $columns ) { $columns = array( 'cb' => '', 'audiencia_caso' => __( 'Caso' ), 'audiencia_fecha' => __( 'Fecha' ), 'audiencia_hora' => __( 'Hora' ), 'audiencia_direccion' => __( 'Dirección' ), ); return $columns; } add_action( 'manage_audiencias_posts_custom_column', 'my_manage_audiencias_columns', 10, 2 ); function my_manage_audiencias_columns( $column, $post_id ) { global $post; switch( $column ) { case 'audiencia_caso' : $editar = get_edit_post_link( $post_id ); /* Get the post meta. */ $audiencia_caso = get_post_meta( $post_id, 'audiencia_caso', true ); /* If no duration is found, output a default message. */ if ( empty( $audiencia_caso ) ) echo __( 'CASO NO DEFINIDO' ); /* If there is a duration, append 'minutes' to the text string. */ else //printf( __( '%s ' ), $audiencia_caso ); //echo "$editar"; echo "$audiencia_caso"; break; case 'audiencia_fecha' : /* Get the post meta. */ $audiencia_fecha = get_post_meta( $post_id, 'audiencia_fecha', true ); /* If no duration is found, output a default message. */ if ( empty( $audiencia_fecha ) ) echo __( 'FECHA NO DEFINIDA' ); /* If there is a duration, append 'minutes' to the text string. */ else printf( __( '%s ' ), $audiencia_fecha ); break; /* If displaying the 'duration' column. */ case 'audiencia_hora' : /* Get the post meta. */ $audiencia_hora = get_post_meta( $post_id, 'audiencia_hora', true ); $audiencia_am_pm = get_post_meta( $post_id, 'audiencia_am_pm', true ); /* If no duration is found, output a default message. */ if ( empty( $audiencia_hora ) ) echo __( 'HORA NO DEFINIDA
' ); /* If there is a duration, append 'minutes' to the text string. */ else printf( __( '%s ' ), $audiencia_hora ); printf( __( '%s ' ), $audiencia_am_pm ); break; /* If displaying the 'duration' column. */ case 'audiencia_direccion' : /* Get the post meta. */ $audiencia_direccion = get_post_meta( $post_id, 'audiencia_direccion', true ); /* If no duration is found, output a default message. */ if ( empty( $audiencia_direccion ) ) echo __( 'FALTA DIRECCIÓN
' ); /* If there is a duration, append 'minutes' to the text string. */ else printf( __( '%s ' ), $audiencia_direccion ); break; /* Just break out of the switch statement for everything else. */ default : break; } } /* ============================ FIN CUSTOM ADMIN audiencias =========================================== */ /* =============================COLUMNAS ADMIN EVENTOS ========================================== */ add_filter( 'manage_edit-eventos_columns', 'my_edit_eventos_columns' ) ; function my_edit_eventos_columns( $columns ) { $columns = array( 'cb' => '', 'title' => __( 'Título' ), 'evento_fecha_col' => __( 'Día del evento' ), 'evento_hora' => __( 'Hora del evento' ), 'evento_direccion' => __( 'Dirección' ), 'area' => __( 'Área' ), ); return $columns; } add_action( 'manage_eventos_posts_custom_column', 'my_manage_eventos_columns', 10, 2 ); function my_manage_eventos_columns( $column, $post_id ) { global $post; switch( $column ) { case 'evento_fecha_col' : /* Get the post meta. */ $evento_fecha = get_post_meta( $post_id, 'evento_fecha', true ); /* If no duration is found, output a default message. */ if ( empty( $evento_fecha ) ) echo __( 'FECHA NO DEFINIDA' ); /* If there is a duration, append 'minutes' to the text string. */ else printf( __( '%s ' ), $evento_fecha ); break; /* If displaying the 'duration' column. */ case 'evento_hora' : /* Get the post meta. */ $evento_hora = get_post_meta( $post_id, 'evento_hora', true ); $evento_am_pm = get_post_meta( $post_id, 'evento_am_pm', true ); /* If no duration is found, output a default message. */ if ( empty( $evento_hora ) ) echo __( 'HORA NO DEFINIDA
' ); /* If there is a duration, append 'minutes' to the text string. */ else printf( __( '%s ' ), $evento_hora ); printf( __( '%s ' ), $evento_am_pm ); break; /* If displaying the 'duration' column. */ case 'evento_direccion' : /* Get the post meta. */ $evento_direccion = get_post_meta( $post_id, 'evento_direccion', true ); /* If no duration is found, output a default message. */ if ( empty( $evento_direccion ) ) echo __( 'FALTA DIRECCIÓN
' ); /* If there is a duration, append 'minutes' to the text string. */ else printf( __( '%s ' ), $evento_direccion ); break; /* If displaying the 'genre' column. */ case 'area' : /* Get the genres for the post. */ $terms = get_the_terms( $post_id, 'categoria_eventos' ); /* If terms were found. */ if ( !empty( $terms ) ) { $out = array(); /* Loop through each term, linking to the 'edit posts' page for the specific term. */ foreach ( $terms as $term ) { $out[] = sprintf( '%s', esc_url( add_query_arg( array( 'post_type' => $post->post_type, 'categoria_eventos' => $term->slug ), 'edit.php' ) ), esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, 'categoria_eventos', 'display' ) ) ); } /* Join the terms, separating them with a comma. */ echo join( ', ', $out ); } /* If no terms were found, output a default message. */ else { _e( 'No categorias' ); } break; /* Just break out of the switch statement for everything else. */ default : break; } } /* ============================ FIN CUSTOM ADMIN EVENTOS =========================================== */ /* =============================COLUMNAS ADMIN GALERIAS ========================================== */ add_filter( 'manage_edit-galerias_columns', 'my_edit_galerias_columns' ) ; function my_edit_galerias_columns( $columns ) { $columns = array( 'cb' => '', 'galeria_imagen' => 'Portada', 'title' => __( 'Título' ), 'area' => __( 'Área' ), 'date' => 'Fecha' ); return $columns; } add_action( 'manage_galerias_posts_custom_column', 'my_manage_galerias_columns', 10, 2 ); function my_manage_galerias_columns( $column, $post_id ) { global $post; switch( $column ) { case 'galeria_imagen': if ( has_post_thumbnail() ) echo the_post_thumbnail( array (80, 45) ); /* If there is a duration, append 'minutes' to the text string. */ else echo __( 'FALTA IMAGEN
' ); break; /* If displaying the 'genre' column. */ case 'area' : /* Get the genres for the post. */ $terms = get_the_terms( $post_id, 'categoria_galerias' ); /* If terms were found. */ if ( !empty( $terms ) ) { $out = array(); /* Loop through each term, linking to the 'edit posts' page for the specific term. */ foreach ( $terms as $term ) { $out[] = sprintf( '%s', esc_url( add_query_arg( array( 'post_type' => $post->post_type, 'categoria_galerias' => $term->slug ), 'edit.php' ) ), esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, 'categoria_galerias', 'display' ) ) ); } /* Join the terms, separating them with a comma. */ echo join( ', ', $out ); } /* If no terms were found, output a default message. */ else { echo __( 'FALTA ASIGNAR CATEGORÍA
' ); } break; /* Just break out of the switch statement for everything else. */ default : break; } } /* ============================ FIN CUSTOM ADMIN GALERIAS =========================================== */ APRODEH Aprodeh Website – Otro sitio realizado con WordPress

La Asociación Pro Derechos Humanos (APRODEH) es un colectivo de personas comprometidas con la vigencia de los Derechos Humanos en el Perú, organizado bajo la forma de asociación civil sin fines de lucro. Surgió en 1983 como una iniciativa de apoyo al trabajo parlamentario, ante la necesidad de dar respuesta a las violaciones de los Derechos Humanos en el contexto de la guerra generada por el terrorismo en el Perú. Se encarga de defender los derechos humanos.