??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/monicslandscape.co.uk/wp-content/plugins/sureforms/inc/translatable.php
⬅ Kembali
<?php
/**
* Translatable Class file for Sureforms.
*
* @package Sureforms
* @since 1.0.5
*/
namespace SRFM\Inc;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Sureforms Translatable Class
*
* A helper class providing an interface for handling translation of text elements, specifically
* frontend validation messages, used in the Sureforms plugin. This class enables dynamic and
* reusable translated strings to enhance user experience across different languages.
*
* @since 1.0.5
*/
class Translatable {
/**
* Retrieve default frontend validation messages.
*
* Returns an array of validation messages, each identified by a unique key. Messages are
* translated for frontend display, with placeholders included for dynamically populated values.
*
* @since 1.0.5
* @return array<string, string> Associative array of translated validation messages for frontend use.
*/
public static function get_frontend_validation_messages() {
$translatable_array = self::dynamic_validation_messages();
/**
* Filter for frontend validation messages.
*
* This filter allows developers to add or modify the default validation messages.
* Primarily intended for enabling custom validation messages and supporting pro functionality.
*
* @internal This filter is primarily used for internal purposes and pro functionality.
*/
return apply_filters( 'srfm_frontend_validation_messages', $translatable_array );
}
/**
* Retrieve default dynamic validation messages.
*
* @since 1.2.1
* @return array<string, string> Associative array of translated validation messages for dynamic use.
*/
public static function dynamic_validation_messages() {
$translatable_array = self::dynamic_messages();
/**
* Filter for dynamic validation messages.
*
* The `srfm_dynamic_validation_messages` filter allows developers to add or modify
* the default dynamic validation messages.
* This is primarily intended for enabling custom validation messages and supporting pro functionality.
*
* @internal This filter is primarily used for internal purposes and pro functionality.
*/
$filtered_array = apply_filters( 'srfm_dynamic_validation_messages', $translatable_array );
$dynamic_options = get_option( 'srfm_default_dynamic_block_option', [] );
if ( ! empty( $dynamic_options ) && is_array( $dynamic_options ) ) {
foreach ( $dynamic_options as $key => $value ) {
if ( isset( $filtered_array[ $key ] ) ) {
$filtered_array[ $key ] = $value;
}
}
}
return $filtered_array;
}
/**
* Dynamic messages array
*
* @since 1.2.1
* @return array<string, string> Associative array of translated dynamic messages.
*/
public static function dynamic_messages() {
return [
'srfm_valid_phone_number' => __( 'Enter a valid phone number.', 'sureforms' ),
'srfm_valid_url' => __( 'Enter a valid URL.', 'sureforms' ),
'srfm_confirm_email_same' => __( 'Confirmation email does not match.', 'sureforms' ),
'srfm_valid_email' => __( 'Enter a valid email address.', 'sureforms' ),
/* translators: %s represents the minimum number of characters required */
'srfm_textarea_min_chars' => __( 'Please enter at least %s characters.', 'sureforms' ),
/* translators: %s represents the minimum acceptable value */
'srfm_input_min_value' => __( 'Minimum value is %s.', 'sureforms' ),
/* translators: %s represents the maximum acceptable value */
'srfm_input_max_value' => __( 'Maximum value is %s.', 'sureforms' ),
/* translators: %s represents the minimum number of options to select */
'srfm_dropdown_min_selections' => __( 'Select at least %s options.', 'sureforms' ),
/* translators: %s represents the maximum number of options that can be selected */
'srfm_dropdown_max_selections' => __( 'You can select up to %s options.', 'sureforms' ),
/* translators: %s represents the minimum number of options to select */
'srfm_multi_choice_min_selections' => __( 'Select at least %s options.', 'sureforms' ),
/* translators: %s represents the maximum number of options that can be selected */
'srfm_multi_choice_max_selections' => __( 'You can select up to %s options.', 'sureforms' ),
];
}
/**
* Source (untranslated) versions of every dynamic validation message.
*
* Used by the multilingual integration to register a stable English key with
* the active provider (e.g., WPML String Translation) regardless of the
* site's current WP locale. The keys match {@see dynamic_messages()}; the
* values are the raw English source strings without any `__()` wrapping,
* so they don't shift when the site locale changes.
*
* @since 2.11.0
* @return array<string, string>
*/
public static function dynamic_messages_source() {
return [
'srfm_valid_phone_number' => 'Enter a valid phone number.',
'srfm_valid_url' => 'Enter a valid URL.',
'srfm_confirm_email_same' => 'Confirmation email does not match.',
'srfm_valid_email' => 'Enter a valid email address.',
'srfm_textarea_min_chars' => 'Please enter at least %s characters.',
'srfm_input_min_value' => 'Minimum value is %s.',
'srfm_input_max_value' => 'Maximum value is %s.',
'srfm_dropdown_min_selections' => 'Select at least %s options.',
'srfm_dropdown_max_selections' => 'You can select up to %s options.',
'srfm_multi_choice_min_selections' => 'Select at least %s options.',
'srfm_multi_choice_max_selections' => 'You can select up to %s options.',
];
}
/**
* Get default form restriction message.
*
* @since 1.10.1
* @return string Translated default form restriction message.
*/
public static function get_default_form_restriction_message() {
return __( 'This form is now closed as we have reached the maximum number of entries.', 'sureforms' );
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 abilities
dir
—
2026-06-24 10:05
📁 admin
dir
—
2026-06-24 10:05
📁 ai-form-builder
dir
—
2026-06-24 10:05
📁 blocks
dir
—
2026-06-24 10:05
📁 compatibility
dir
—
2026-06-24 10:05
📁 database
dir
—
2026-06-24 10:05
📁 email
dir
—
2026-06-24 10:05
📁 fields
dir
—
2026-06-24 10:05
📁 global-settings
dir
—
2026-06-24 10:05
📁 lib
dir
—
2026-06-24 10:05
📁 migrator
dir
—
2026-06-24 10:05
📁 page-builders
dir
—
2026-06-24 10:05
📁 payments
dir
—
2026-06-24 10:05
📁 single-form-settings
dir
—
2026-06-24 10:05
📁 traits
dir
—
2026-06-24 10:05
🐘 activator.php
php
1 KB
2024-11-06 21:27
🐘 admin-ajax.php
php
13.2 KB
2026-05-14 16:10
🐘 background-process.php
php
4.8 KB
2025-11-20 12:53
🐘 create-new-form.php
php
4.9 KB
2026-05-05 15:45
🐘 duplicate-form.php
php
8.4 KB
2026-05-27 18:00
🐘 entries.php
php
24.3 KB
2026-05-27 18:00
🐘 events-scheduler.php
php
1.3 KB
2024-05-03 19:04
🐘 export.php
php
11.8 KB
2026-05-27 18:00
🐘 field-validation.php
php
22.9 KB
2026-06-16 19:01
🐘 form-restriction.php
php
11.2 KB
2026-06-10 14:05
🐘 form-styling.php
php
7 KB
2026-03-31 17:26
🐘 form-submit.php
php
55.6 KB
2026-06-10 14:05
🐘 forms-data.php
php
7.1 KB
2026-03-23 14:59
🐘 frontend-assets.php
php
16.3 KB
2026-06-16 19:01
🐘 generate-form-markup.php
php
49.3 KB
2026-06-10 14:05
🐘 gutenberg-hooks.php
php
10.9 KB
2026-06-10 14:05
🐘 helper.php
php
92.1 KB
2026-06-16 19:01
🐘 learn.php
php
13.5 KB
2026-04-16 14:46
🐘 onboarding.php
php
3.9 KB
2026-06-10 14:05
🐘 post-types.php
php
48.4 KB
2026-06-10 14:05
🐘 rest-api.php
php
56.7 KB
2026-06-16 19:01
🐘 smart-tags.php
php
28.1 KB
2026-04-27 16:05
🐘 submit-token.php
php
4.6 KB
2026-03-31 17:26
🐘 translatable.php
php
5.9 KB
2026-06-10 14:05
🐘 updater-callbacks.php
php
3.3 KB
2024-12-17 16:52
🐘 updater.php
php
5.1 KB
2024-12-17 16:52