add wp-future
This commit is contained in:
@@ -213,11 +213,11 @@ function lat_slug( $post_id ){
|
||||
if ( wp_is_post_revision( $post_id ))
|
||||
return;
|
||||
|
||||
$post = get_posts($post_id);
|
||||
$name = urldecode($post[0]->post_name);
|
||||
$currpost = get_post($post_id);
|
||||
$name = urldecode($currpost->post_name);
|
||||
|
||||
if (isContainsRussianLetters($name)) { //если есть русские буковки
|
||||
$title = express_slug($post[0]->post_title);
|
||||
$title = express_slug($currpost->post_title);
|
||||
$latname = vij_slug($title);
|
||||
remove_action( 'save_post', 'lat_slug' ); // избегаем зацикливания
|
||||
wp_update_post( array( 'ID' => $post_id, 'post_name' => $latname ) );
|
||||
|
||||
Reference in New Issue
Block a user