<?php
/**
 * Pineapple WPEX functions and definitions.
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package WordPress
 * @subpackage Pineapple WPEX
 * @since 1.0
 */

/**
 * Alters the default excerpt length.
 *
 * @since 1.0
 *
 * @param int $number The maximum number of words. Default 55.
 */
if ( ! function_exists( 'pineapple_wpex_excerpt_length' ) ) :
	function pineapple_wpex_excerpt_length( $number ) {
		$number = 60;
		return $number;
	}
	add_filter( 'excerpt_length', 'pineapple_wpex_excerpt_length' );
endif;

/**
 * Alters the default excerpt_more string.
 *
 * @since 1.0
 *
 * @param string $more_string The string shown within the more link.
 */
if ( ! function_exists( 'pineapple_wpex_excerpt_more' ) ) :
	function pineapple_wpex_excerpt_more( $more_string ) {
		$more_string = '&hellip;';
		return $more_string;
	}
	add_filter( 'excerpt_more', 'pineapple_wpex_excerpt_more' );
endif;
