/home/vianto5/hidalgoresidences.mx/wp-content/plugins/wpml-string-translation/classes
NameSizeModeActions
actions/-0755rm
admin-texts/-0755rm
API/-0755rm
basket/-0755rm
batch-action/-0755rm
batch-translation/-0755rm
container/-0755rm
db-mappers/-0755rm
filters/-0755rm
gettext-hooks/-0755rm
menus/-0755rm
MO/-0755rm
package/-0755rm
package-translation/-0755rm
po-import/-0755rm
privacy/-0755rm
records/-0755rm
shortcode/-0755rm
slug-translation/-0755rm
Storage/-0755rm
string-tracking/-0755rm
string-translation/-0755rm
string-translation-ui/-0755rm
strings-cleanup/-0755rm
strings-scanning/-0755rm
support/-0755rm
translation-files/-0755rm
translation-memory/-0755rm
TranslationJob/-0755rm
translations-file-scan/-0755rm
Troubleshooting/-0755rm
upgrade/-0755rm
utilities/-0755rm
wpml-tm/-0755rm
WpSettings/-0755rm
AutoRegisterStringsNotice.php17370644editdlrm
class-wpml-admin-notifier.php2700644editdlrm
class-wpml-language-of-domain.php9860644editdlrm
class-wpml-st-admin-string.php7520644editdlrm
class-wpml-st-initialize.php10780644editdlrm
class-wpml-st-reset.php16290644editdlrm
class-wpml-st-settings.php13010644editdlrm
class-wpml-st-string-factory.php29970644editdlrm
class-wpml-st-string-statuses.php8080644editdlrm
class-wpml-st-string.php118570644editdlrm
class-wpml-st-strings.php149530644editdlrm
class-wpml-st-user-fields.php70870644editdlrm
class-wpml-st-verify-dependencies.php13520644editdlrm
SendStringsForTranslationNotice.php11060644editdlrm
Shortcode.php21130644editdlrm
StringsRepository.php40650644editdlrm
TranslateWpmlString.php76230644editdlrm
Edit: /home/vianto5/hidalgoresidences.mx/wp-content/plugins/wpml-string-translation/classes/Shortcode.php (2113B)
wpdb = $wpdb; } function init_hooks() { add_shortcode( 'wpml-string', [ $this, 'render' ] ); } /** * @param array $attributes * @param string $value * * @return string */ function render( $attributes, $value ) { $this->parse_attributes( $attributes, $value ); $this->maybe_register_string( $value ); return do_shortcode( icl_t( $this->context, $this->name, $value ) ); } /** * @param string $value */ private function maybe_register_string( $value ) { $string = $this->get_registered_string(); if ( ! $string || $string->value !== $value ) { icl_register_string( $this->context, $this->name, $value ); } } /** * @param array $attributes * @param string $value */ private function parse_attributes( $attributes, $value ) { $pairs = array( 'context' => self::STRING_DOMAIN, 'name' => 'wpml-shortcode-' . md5( $value ), ); $attributes = shortcode_atts( $pairs, $attributes ); $this->context = $attributes['context']; $this->name = $attributes['name']; } /** * @return \stdClass */ private function get_registered_string() { $strings = $this->get_strings_registered_in_context(); if ( $strings && array_key_exists( $this->name, $strings ) ) { return $strings[ $this->name ]; } return null; } /** * @return \stdClass[] */ private function get_strings_registered_in_context() { $cache_key = $this->context; $cache_group = 'wpml-string-shortcode'; $cache_found = false; $string = wp_cache_get( $cache_key, $cache_group, false, $cache_found ); if ( ! $cache_found ) { $query = 'SELECT name, id, value, status FROM ' . $this->wpdb->prefix . 'icl_strings WHERE context=%s'; $sql = $this->wpdb->prepare( $query, $this->context ); $string = $this->wpdb->get_results( $sql, OBJECT_K ); wp_cache_set( $cache_key, $string, $cache_group ); } return $string; } }