Modifica denominación de Apuntes por Notas breves

This commit is contained in:
Manuel Cillero 2020-05-07 20:23:09 +02:00
parent f6a7c540a3
commit bcb8953a07
2 changed files with 14 additions and 14 deletions

View file

@ -17,7 +17,7 @@ if ( !function_exists( 'write_log' ) ) {
error_log( "$log\n", 3, '/tmp/manuel.cillero.errors.log' );
}
# }
}
}
}
/*
@ -28,7 +28,7 @@ add_filter( 'body_class', 'add_category_name' );
function add_category_name( $classes = '' ) {
if ( is_single() ) {
$category = get_the_category();
$classes[] = 'category-' . $category[0]->slug;
$classes[] = 'category-' . $category[0]->slug;
}
return $classes;
}
@ -82,9 +82,9 @@ function fix_single_post_title( $args, $id ) {
else {
// Post categories by name:
$categories = array_values( array_column( get_the_category(), 'name' ) );
if ( in_array( $categories[0], array( 'Blog', 'Archivo de notas', 'Apuntes', 'Álbum de fotos' ) ) ) {
if ( in_array( $categories[0], array( 'Blog', 'Archivo de notas', 'Notas breves', 'Álbum de fotos' ) ) ) {
$args['title'] = $categories[0];
}
}
}
}
elseif ( is_category() || is_tag() ) {
@ -202,7 +202,7 @@ function before_save_post( $data, $postarr ) {
}
else {
$data['post_content'] = substr( $data['post_content'], $dotpos + 2 );
}
}
}
}
else {