Añadir mu-plugins y scripts de feadulta
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
$D = [
|
||||
410 => ['en'=>'New Testament','fr'=>'Nouveau Testament','it'=>'Nuovo Testamento','pt'=>'Novo Testamento'],
|
||||
411 => ['en'=>'Old Testament','fr'=>'Ancien Testament','it'=>'Antico Testamento','pt'=>'Antigo Testamento'],
|
||||
49 => ['en'=>'Advent and Christmas','fr'=>'Avent et Noël','it'=>'Avvento e Natale','pt'=>'Advento e Natal'],
|
||||
12 => ['en'=>'In Memoriam','fr'=>'In Memoriam','it'=>'In Memoriam','pt'=>'In Memoriam'],
|
||||
1651 => ['en'=>'News','fr'=>'Actualités','it'=>'Notizie','pt'=>'Notícias'],
|
||||
61 => ['en'=>'Christian Communities','fr'=>'Communautés chrétiennes','it'=>'Comunità cristiane','pt'=>'Comunidades cristãs'],
|
||||
23 => ['en'=>'Letters We Receive','fr'=>'Lettres reçues','it'=>'Lettere che riceviamo','pt'=>'Cartas que recebemos'],
|
||||
39 => ['en'=>'Topics','fr'=>'Thèmes','it'=>'Temi','pt'=>'Temas'],
|
||||
27 => ['en'=>'Chronological Index','fr'=>'Index chronologique','it'=>'Indice cronologico','pt'=>'Índice cronológico'],
|
||||
63 => ['en'=>'EFFA','fr'=>'EFFA','it'=>'EFFA','pt'=>'EFFA'],
|
||||
];
|
||||
$fixed=0;
|
||||
foreach ($D as $es=>$names) {
|
||||
foreach ($names as $L=>$correct) {
|
||||
$t = pll_get_term($es, $L);
|
||||
if (!$t) { echo " $es/$L sin término\n"; continue; }
|
||||
$cur = get_term($t)->name;
|
||||
if ($cur !== $correct) {
|
||||
wp_update_term($t, 'category', ['name'=>$correct]);
|
||||
echo " #$t [$L] \"$cur\" → \"$correct\"\n"; $fixed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "nombres corregidos: $fixed\n";
|
||||
Reference in New Issue
Block a user