/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/includes
NameSizeModeActions
admin/-0755rm
api/-0755rm
database/-0755rm
deprecated/-0755rm
donors/-0755rm
emails/-0755rm
forms/-0755rm
frontend/-0755rm
gateways/-0755rm
libraries/-0755rm
payments/-0755rm
actions.php97230644editdlrm
ajax-functions.php208420644editdlrm
class-give-async-process.php11770644editdlrm
class-give-background-updater.php131100644editdlrm
class-give-cache-setting.php64020644editdlrm
class-give-cache.php181860644editdlrm
class-give-cli-commands.php331540644editdlrm
class-give-comment.php173860644editdlrm
class-give-cron.php51570644editdlrm
class-give-donate-form.php240780644editdlrm
class-give-donor.php410070644editdlrm
class-give-email-access.php85030644editdlrm
class-give-license-handler.php276100644editdlrm
class-give-logging.php74920644editdlrm
class-give-readme-parser.php12590644editdlrm
class-give-roles.php107830644editdlrm
class-give-scripts.php251590644editdlrm
class-give-session.php151640644editdlrm
class-give-stats.php120490644editdlrm
class-give-template-loader.php36380644editdlrm
class-give-tooltips.php46700644editdlrm
class-give-translation.php84660644editdlrm
class-notices.php194010644editdlrm
country-functions.php779720644editdlrm
currencies-list.php489370644editdlrm
currency-functions.php117840644editdlrm
error-tracking.php29960644editdlrm
filters.php89460644editdlrm
formatting.php252060644editdlrm
install.php165350644editdlrm
login-register.php105780644editdlrm
misc-functions.php1132970644editdlrm
plugin-compatibility.php32470644editdlrm
post-types.php182240644editdlrm
price-functions.php28950644editdlrm
process-donation.php479790644editdlrm
setting-functions.php44610644editdlrm
shortcodes.php298230644editdlrm
template-functions.php132920644editdlrm
user-functions.php161450644editdlrm
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/includes/class-give-translation.php (8466B)
'', 'id' => '', 'group' => '', 'type' => 'text', ) ); try { // Check for errors. if ( empty( $args['text'] ) ) { /* @var WP_Error $error */ $error = new WP_Error( 'EMPTY_TEXT', __( 'Empty string is not allowed.', 'give' ), $args ); throw new Exception( $error->get_error_message( 'EMPTY_TEXT' ) ); } elseif ( empty( $args['id'] ) ) { /* @var WP_Error $error */ $error = new WP_Error( 'EMPTY_ID', __( 'Empty ID is not allowed.', 'give' ), $args ); throw new Exception( $error->get_error_message( 'EMPTY_ID' ) ); } elseif ( empty( $args['group'] ) && array_key_exists( $args['id'], self::$text_configs ) ) { /* @var WP_Error $error */ $error = new WP_Error( 'TEXT_ID_ALREADY_EXIST', __( 'Text ID without a group already exists.', 'give' ), $args ); throw new Exception( $error->get_error_message( 'TEXT_ID_ALREADY_EXIST' ) ); } elseif ( ! empty( $args['group'] ) && ! empty( self::$text_configs[ $args['group'] ] ) && array_key_exists( $args['id'], self::$text_configs[ $args['group'] ] ) ) { /* @var WP_Error $error */ $error = new WP_Error( 'TEXT_ID_WITHIN_GROUP_ALREADY_EXIST', __( 'Text ID within a group already exists.', 'give' ), $args ); throw new Exception( $error->get_error_message( 'TEXT_ID_WITHIN_GROUP_ALREADY_EXIST' ) ); } // Add text. if ( ! empty( $args['group'] ) ) { self::$text_configs[ $args['group'] ][ $args['id'] ] = $args; } else { self::$text_configs[ $args['id'] ] = $args; } } catch ( Exception $e ) { Log::error( $e->getMessage() ); }// End try(). /** * Filter the texts * * @since 2.0 */ self::$text_configs = apply_filters( 'give_texts', self::$text_configs ); return $error; } /** * Add label by group ( if any ) * * @since 2.0 * @access public * * @param array $args * * @return string */ public static function add_label( $args = array() ) { // Set text params. $args = wp_parse_args( $args, array( 'text' => '', 'id' => '', 'group' => '', ) ); $args['type'] = 'label'; $args['id'] = "{$args['id']}_label"; return self::add_text( $args ); } /** * Add tooltip by group ( if any ) * * @since 2.0 * @access public * * @param array $args * * @return string */ public static function add_tooltip( $args = array() ) { // Set text params. $args = wp_parse_args( $args, array( 'text' => '', 'id' => '', 'group' => '', ) ); $args['type'] = 'tooltip'; $args['id'] = "{$args['id']}_tooltip"; return self::add_text( $args ); } /** * Add translation by group ( if any ) * * @since 2.0 * @access public * * @param array 4args * * @return string */ public static function add_translation( $args = array() ) { $args = wp_parse_args( $args, array( 'id' => '', 'group' => '', 'text' => '', ) ); // Bailout. if ( empty( $args['id'] ) ) { return; } if ( ! empty( $args['group'] ) ) { self::$text_translations[ $args['group'] ][ $args['id'] ] = $args['text']; } else { self::$text_translations[ $args['id'] ] = $args['text']; } } /** * Get label translation by group ( if any ) * * @since 2.0 * @access public * * @param string $id * @param string $group * @param string $text * * @return string */ public static function add_label_translation( $id, $group = '', $text = '' ) { return self::get_text( array( 'id' => "{$id}_label", 'group' => $group, 'text' => $text, ) ); } /** * Get tooltip translation by group ( if any ) * * @since 2.0 * @access public * * @param string $id * @param string $group * @param string $text * * @return string */ public static function add_tooltip_translation( $id, $group = '', $text = '' ) { return self::get_text( array( 'id' => "{$id}_label", 'group' => $group, 'text' => $text, ) ); } /** * Get label by group ( if any ) * * @since 2.0 * @access public * * @param string $id * @param string $group * * @return string */ public static function get_label( $id, $group = '' ) { return self::get_text( array( 'id' => "{$id}_label", 'group' => $group, 'type' => 'label', ) ); } /** * Get tooltip by group ( if any ) * * @since 2.0 * @access public * * @param string $id * @param string $group * * @return string */ public static function get_tooltip( $id, $group = '' ) { return self::get_text( array( 'id' => "{$id}_tooltip", 'group' => $group, 'type' => 'tooltip', ) ); } /** * Get text by group * * @since 2.0 * @access public * * @param array $args * * @return string */ public static function get_text( $args = array() ) { $text = ''; // Bailout. if ( empty( $args ) ) { return $text; } // Setup args. $args = wp_parse_args( $args, array( 'id' => '', 'group' => '', 'type' => 'text', ) ); // Check if text exist. if ( empty( $args['id'] ) || ( empty( $args['group'] ) && ! array_key_exists( $args['id'], self::$text_configs ) ) || ( ! empty( $args['group'] ) && ! empty( self::$text_configs[ $args['group'] ] ) && ! array_key_exists( $args['id'], self::$text_configs[ $args['group'] ] ) ) ) { return $text; } // Get text value. if ( ! empty( $args['group'] ) && array_key_exists( $args['group'], self::$text_configs ) ) { $text = self::$text_configs[ $args['group'] ][ $args['id'] ]['text']; // Get translated text if exist. if ( ! empty( self::$text_translations ) && ! empty( self::$text_translations[ $args['group'] ] ) && array_key_exists( $args['id'], self::$text_translations[ $args['group'] ] ) ) { $text = self::$text_translations[ $args['group'] ][ $args['id'] ]; } } elseif ( empty( $args['group'] ) && array_key_exists( $args['id'], self::$text_configs ) ) { $text = self::$text_configs[ $args['id'] ]['text']; // Get translated text if exist. if ( ! empty( self::$text_translations ) && array_key_exists( $args['id'], self::$text_translations ) ) { $text = self::$text_translations[ $args['id'] ]; } } /** * Filter the give text * * @since 2.0 */ $text = apply_filters( 'give_text', $text, $args, self::$text_configs, self::$text_translations ); return $text; } } // Setup translations. Give_Translations::get_instance()->setup();