<?php
/**
 * Preface.
 *
 * @package MadeByAura\Prime\Helpers
 * @author  MadeByAura.com
 */

namespace MadeByAura\Prime\Helpers;

defined( 'ABSPATH' ) || die();

/**
 * Preface.
 */
class Preface {
	/**
	 * Get blog title.
	 *
	 * @return string $text
	 */
	public static function get_blog_title() {
		$text    = __( 'Blog', 'aura-prime' );
		$page_id = get_option( 'page_for_posts' );

		if ( 'page' === get_option( 'show_on_front' ) && $page_id ) {
			$text = get_the_title( get_option( 'page_for_posts' ) );
		}

		return $text;
	}

	/**
	 * Get shop title.
	 *
	 * @return string $text
	 */
	public static function get_shop_title() {
		$text    = __( 'Shop', 'aura-prime' );
		$page_id = get_option( 'woocommerce_shop_page_id' );

		if ( $page_id ) {
			$text = get_the_title( $page_id );
		}

		return $text;
	}
}
