/
home
/
techb158
/
primomovers.ca
/
wp-content
/
plugins
/
everest-forms
/
includes
/
/home/techb158/primomovers.ca/wp-content/plugins/everest-forms/includes
mkdir
upload
Name
Size
Mode
Actions
abilities/
-
0755
rm
abstracts/
-
0755
rm
admin/
-
0755
rm
blocks/
-
0755
rm
elementor/
-
0755
rm
export/
-
0755
rm
fields/
-
0755
rm
Helpers/
-
0755
rm
Integrations/
-
0755
rm
interfaces/
-
0755
rm
libraries/
-
0755
rm
log-handlers/
-
0755
rm
RestApi/
-
0755
rm
shortcodes/
-
0755
rm
stats/
-
0755
rm
templates/
-
0755
rm
traits/
-
0755
rm
class-everest-forms.php
15147
0644
edit
dl
rm
class-evf-addon-upsell.php
10592
0644
edit
dl
rm
class-evf-ajax.php
78822
0644
edit
dl
rm
class-evf-autoloader.php
1968
0644
edit
dl
rm
class-evf-background-process-import-entries.php
5276
0644
edit
dl
rm
class-evf-background-updater.php
3351
0644
edit
dl
rm
class-evf-cache-helper.php
2416
0644
edit
dl
rm
class-evf-cron.php
1871
0644
edit
dl
rm
class-evf-deprecated-action-hooks.php
4008
0644
edit
dl
rm
class-evf-deprecated-filter-hooks.php
3729
0644
edit
dl
rm
class-evf-email-entries-report.php
11878
0644
edit
dl
rm
class-evf-emails.php
20134
0644
edit
dl
rm
class-evf-fields.php
4828
0644
edit
dl
rm
class-evf-form-handler.php
16780
0644
edit
dl
rm
class-evf-form-task.php
95466
0644
edit
dl
rm
class-evf-forms-features.php
1957
0644
edit
dl
rm
class-evf-frontend-scripts.php
17399
0644
edit
dl
rm
class-evf-install.php
21513
0644
edit
dl
rm
class-evf-integrations.php
6943
0644
edit
dl
rm
class-evf-log-levels.php
2674
0644
edit
dl
rm
class-evf-logger.php
8471
0644
edit
dl
rm
class-evf-post-types.php
5254
0644
edit
dl
rm
class-evf-privacy.php
7587
0644
edit
dl
rm
class-evf-report-cron.php
6689
0644
edit
dl
rm
class-evf-reporting.php
1201
0644
edit
dl
rm
class-evf-session-handler.php
8211
0644
edit
dl
rm
class-evf-shortcodes.php
2084
0644
edit
dl
rm
class-evf-smart-tags.php
20742
0644
edit
dl
rm
class-evf-template-loader.php
14643
0644
edit
dl
rm
class-evf-validation.php
934
0644
edit
dl
rm
evf-conditional-functions.php
1242
0644
edit
dl
rm
evf-core-functions.php
201575
0644
edit
dl
rm
evf-deprecated-functions.php
6365
0644
edit
dl
rm
evf-entry-functions.php
9367
0644
edit
dl
rm
evf-formatting-functions.php
15958
0644
edit
dl
rm
evf-notice-functions.php
6378
0644
edit
dl
rm
evf-template-functions.php
1225
0644
edit
dl
rm
evf-template-hooks.php
439
0644
edit
dl
rm
evf-update-functions.php
10203
0644
edit
dl
rm
Edit:
/home/techb158/primomovers.ca/wp-content/plugins/everest-forms/includes/evf-notice-functions.php
(6378B)
<?php /** * Everest Forms Message Functions * * Functions for error/message handling and display. * * @package EverestForms/Functions * @version 1.0.0 */ defined( 'ABSPATH' ) || exit; /** * Get the count of notices added, either for all notices (default) or for one. * particular notice type specified by $notice_type. * * @since 1.0.0 * @param string $notice_type Optional. The name of the notice type - either error, success or notice. * @return int */ function evf_notice_count( $notice_type = '' ) { if ( ! did_action( 'everest_forms_init' ) ) { evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' ); return; } $notice_count = 0; $all_notices = evf()->session->get( 'evf_notices', array() ); if ( isset( $all_notices[ $notice_type ] ) ) { $notice_count = count( $all_notices[ $notice_type ] ); } elseif ( empty( $notice_type ) ) { foreach ( $all_notices as $notices ) { $notice_count += count( $notices ); } } return $notice_count; } /** * Check if a notice has already been added. * * @since 1.0.0 * @param string $message The text to display in the notice. * @param string $notice_type Optional. The name of the notice type - either error, success or notice. * @return bool */ function evf_has_notice( $message, $notice_type = 'success' ) { if ( ! did_action( 'everest_forms_init' ) ) { evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' ); return false; } $notices = evf()->session->get( 'evf_notices', array() ); $notices = isset( $notices[ $notice_type ] ) ? $notices[ $notice_type ] : array(); return array_search( $message, $notices, true ) !== false; } /** * Add and store a notice. * * @since 1.0.0 * @param string $message The text to display in the notice. * @param string $notice_type Optional. The name of the notice type - either error, success or notice. */ function evf_add_notice( $message, $notice_type = 'success' ) { if ( ! did_action( 'everest_forms_init' ) ) { evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' ); return; } if ( evf_is_amp() ) { return; } $notices = evf()->session->get( 'evf_notices', array() ); // Backward compatibility. if ( 'success' === $notice_type ) { $message = apply_filters( 'everest_forms_add_message', $message ); } $notices[ $notice_type ][] = apply_filters( 'everest_forms_add_' . $notice_type, $message ); evf()->session->set( 'evf_notices', $notices ); } /** * Set all notices at once. * * @since 1.0.0 * @param mixed $notices Array of notices. */ function evf_set_notices( $notices ) { if ( ! did_action( 'everest_forms_init' ) ) { evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' ); return; } evf()->session->set( 'evf_notices', $notices ); } /** * Unset all notices. * * @since 1.0.0 */ function evf_clear_notices() { if ( ! did_action( 'everest_forms_init' ) ) { evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' ); return; } evf()->session->set( 'evf_notices', null ); } /** * Prints messages and errors which are stored in the session, then clears them. * * @since 1.0.0 * * @param array $form_data Prepared form settings. */ function evf_print_notices( $form_data = array() ) { if ( ! did_action( 'everest_forms_init' ) ) { evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' ); return; } $form_id = isset( $form_data['id'] ) ? absint( $form_data['id'] ) : 0; $all_notices = evf()->session->get( 'evf_notices', array() ); $notice_types = apply_filters( 'everest_forms_notice_types', array( 'error', 'success', 'notice' ) ); // Skips notice print if it isn't the right form. if ( isset( $_REQUEST['everest_forms']['id'] ) && ( (int) $form_id !== (int) $_REQUEST['everest_forms']['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification return; } foreach ( $notice_types as $notice_type ) { if ( evf_notice_count( $notice_type ) > 0 ) { foreach ( $all_notices[ $notice_type ] as $key => $message ) { $all_notices[ $notice_type ][ $key ] = evf_string_translation( $form_id, 'notice_message_' . $notice_type, $message ); } evf_get_template( "notices/{$notice_type}.php", array( 'messages' => array_filter( $all_notices[ $notice_type ] ), ) ); } } evf_clear_notices(); } add_action( 'everest_forms_display_fields_before', 'evf_print_notices', 10 ); /** * Print a single notice immediately. * * @since 1.0.0 * @param string $message The text to display in the notice. * @param string $notice_type Optional. The name of the notice type - either error, success or notice. */ function evf_print_notice( $message, $notice_type = 'success' ) { if ( 'success' === $notice_type ) { $message = apply_filters( 'everest_forms_add_message', $message ); } evf_get_template( "notices/{$notice_type}.php", array( 'messages' => array( apply_filters( 'everest_forms_add_' . $notice_type, $message ) ), ) ); } /** * Returns all queued notices, optionally filtered by a notice type. * * @since 1.0.0 * @param string $notice_type Optional. The name of the notice type - either error, success or notice. * @return array|mixed */ function evf_get_notices( $notice_type = '' ) { if ( ! did_action( 'everest_forms_init' ) ) { evf_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before everest_forms_init.', 'everest-forms' ), '1.0' ); return; } $all_notices = evf()->session->get( 'evf_notices', array() ); if ( empty( $notice_type ) ) { $notices = $all_notices; } elseif ( isset( $all_notices[ $notice_type ] ) ) { $notices = $all_notices[ $notice_type ]; } else { $notices = array(); } return $notices; } /** * Add notices for WP Errors. * * @param WP_Error $errors Errors. */ function evf_add_wp_error_notices( $errors ) { if ( is_wp_error( $errors ) && $errors->get_error_messages() ) { foreach ( $errors->get_error_messages() as $error ) { evf_add_notice( $error, 'error' ); } } }
Save
cmd:
run