1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
<?php
/**
* Astra Theme Strings
*
* @package Astra
* @author Astra
* @copyright Copyright (c) 2020, Astra
* @link https://wpastra.com/
* @since Astra 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Default Strings
*/
if ( ! function_exists( 'astra_default_strings' ) ) {
/**
* Default Strings
*
* @since 1.0.0
* @param string $key String key.
* @param boolean $echo Print string.
* @return mixed Return string or nothing.
*/
function astra_default_strings( $key, $echo = true ) {
$defaults = apply_filters(
'astra_default_strings',
array(
// Header.
'string-header-skip-link' => __( 'Skip to content', 'astra' ),
// 404 Page Strings.
'string-404-sub-title' => __( 'It looks like the link pointing here was faulty. Maybe try searching?', 'astra' ),
// Search Page Strings.
'string-search-nothing-found' => __( 'Nothing Found', 'astra' ),
'string-search-nothing-found-message' => __( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'astra' ),
'string-full-width-search-message' => __( 'Start typing and press enter to search', 'astra' ),
'string-full-width-search-placeholder' => __( 'Search …', 'astra' ),
'string-header-cover-search-placeholder' => __( 'Search …', 'astra' ),
'string-search-input-placeholder' => __( 'Search …', 'astra' ),
// Comment Template Strings.
'string-comment-reply-link' => __( 'Reply', 'astra' ),
'string-comment-edit-link' => __( 'Edit', 'astra' ),
'string-comment-awaiting-moderation' => __( 'Your comment is awaiting moderation.', 'astra' ),
'string-comment-title-reply' => __( 'Leave a Comment', 'astra' ),
'string-comment-cancel-reply-link' => __( 'Cancel Reply', 'astra' ),
'string-comment-label-submit' => __( 'Post Comment »', 'astra' ),
'string-comment-label-message' => __( 'Type here..', 'astra' ),
'string-comment-label-name' => __( 'Name*', 'astra' ),
'string-comment-label-email' => __( 'Email*', 'astra' ),
'string-comment-label-website' => __( 'Website', 'astra' ),
'string-comment-closed' => __( 'Comments are closed.', 'astra' ),
'string-comment-navigation-title' => __( 'Comment navigation', 'astra' ),
'string-comment-navigation-next' => __( 'Newer Comments', 'astra' ),
'string-comment-navigation-previous' => __( 'Older Comments', 'astra' ),
// Blog Default Strings.
'string-blog-page-links-before' => __( 'Pages:', 'astra' ),
'string-blog-meta-author-by' => __( 'By ', 'astra' ),
'string-blog-meta-leave-a-comment' => __( 'Leave a Comment', 'astra' ),
'string-blog-meta-one-comment' => __( '1 Comment', 'astra' ),
'string-blog-meta-multiple-comment' => __( '% Comments', 'astra' ),
'string-blog-navigation-next' => __( 'Next Page', 'astra' ) . ' <span class="ast-right-arrow">→</span>',
'string-blog-navigation-previous' => '<span class="ast-left-arrow">←</span> ' . __( 'Previous Page', 'astra' ),
// Single Post Default Strings.
'string-single-page-links-before' => __( 'Pages:', 'astra' ),
/* translators: 1: Post type label */
'string-single-navigation-next' => __( 'Next %s', 'astra' ) . ' <span class="ast-right-arrow">→</span>',
/* translators: 1: Post type label */
'string-single-navigation-previous' => '<span class="ast-left-arrow">←</span> ' . __( 'Previous %s', 'astra' ),
// Content None.
'string-content-nothing-found-message' => __( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'astra' ),
)
);
if ( is_rtl() ) {
$defaults['string-blog-navigation-next'] = __( 'Next Page', 'astra' ) . ' <span class="ast-left-arrow">←</span>';
$defaults['string-blog-navigation-previous'] = '<span class="ast-right-arrow">→</span> ' . __( 'Previous Page', 'astra' );
/* translators: 1: Post type label */
$defaults['string-single-navigation-next'] = __( 'Next %s', 'astra' ) . ' <span class="ast-left-arrow">←</span>';
/* translators: 1: Post type label */
$defaults['string-single-navigation-previous'] = '<span class="ast-right-arrow">→</span> ' . __( 'Previous %s', 'astra' );
}
$output = isset( $defaults[ $key ] ) ? $defaults[ $key ] : '';
/**
* Print or return
*/
if ( $echo ) {
echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
return $output;
}
}
}
|