<?php
/**
 * Filters
 *
 * @package nexter-fse
 * @since 1.0.0
 */

/**
 * Show '(No title)' if a post has no title.
 *
 * @since 1.0.0
 */
add_filter( 'the_title', 'nexter_fse_page_title');
function nexter_fse_page_title($title) {
    if (!is_admin() && empty($title)) {
        $title = _x('(No title)', 'Used if post or pages has no title', 'nexter-fse');
    }

    return $title;
}

/**
 * Replace the default [...] excerpt more with an elipsis.
 *
 * @since 1.0.0
 */
add_filter( 'excerpt_more', 'nexter_fse_excerpt_more');
function nexter_fse_excerpt_more($more) {
    if ( is_admin() ){
        return $more;
    }
    return '&hellip;';
}
