);">
', ']]>', $text);
$text = preg_replace('@@si', '', $text);
$text = strip_tags($text, '');
$excerpt_length = 30;
$words = explode(' ', $text, $excerpt_length + 1);
if (count($words)> $excerpt_length) {
array_pop($words);
array_push($words, '...');
$text = implode(' ', $words);
}
}
return $text;
}
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'new_trim_excerpt');
/* wp_body_open function check */
if ( ! function_exists( 'wp_body_open' ) ) {
function wp_body_open() {
do_action( 'wp_body_open' );
}
}
/**
* Register and enqueue a custom stylesheet in the WordPress admin.
*/
function astral_enqueue_custom_admin_style() {
wp_register_style( 'astral_custom_admin_css', get_template_directory_uri() . '/css/admin-themes.css' );
wp_enqueue_style( 'astral_custom_admin_css' );
}
add_action( 'admin_enqueue_scripts', 'astral_enqueue_custom_admin_style' );