explode( ':', $meta_line, 2 ) ); $this->headers[ strtolower( $name ) ] = $value; } } else { /* * In MO files, the key normally contains both singular and plural versions. * However, this just adds the singular string for lookup, * which caters for cases where both __( 'Product' ) and _n( 'Product', 'Products' ) * are used and the translation is expected to be the same for both. */ $parts = explode( "\0", (string) $original ); $this->entries[ $parts[0] ] = $translation; } } return true; } /** * Exports translation contents as a string. * * @since 6.5.0 * * @return string Translation file contents. */ public function export(): string { // Prefix the headers as the first key. $headers_string = ''; foreach ( $this->headers as $header => $value ) { $headers_string .= "{$header}: $value\n"; } $entries = array_merge( array( '' => $headers_string ), $this->entries ); $entry_count = count( $entries ); if ( false === $this->uint32 ) { $this->uint32 = 'V'; } $bytes_for_entries = $entry_count * 4 * 2; // Pair of 32bit ints per entry. $originals_addr = 28; /* header */ $translations_addr = $originals_addr + $bytes_for_entries; $hash_addr = $translations_addr + $bytes_for_entries; $entry_offsets = $hash_addr; $file_header = pack( $this->uint32 . '*', // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. (int) self::MAGIC_MARKER, 0, /* rev */ $entry_count, $originals_addr, $translations_addr, 0, /* hash_length */ $hash_addr ); $o_entries = ''; $t_entries = ''; $o_addr = ''; $t_addr = ''; foreach ( array_keys( $entries ) as $original ) { $o_addr .= pack( $this->uint32 . '*', strlen( $original ), $entry_offsets ); $entry_offsets += strlen( $original ) + 1; $o_entries .= $original . "\0"; } foreach ( $entries as $translations ) { $t_addr .= pack( $this->uint32 . '*', strlen( $translations ), $entry_offsets ); $entry_offsets += strlen( $translations ) + 1; $t_entries .= $translations . "\0"; } return $file_header . $o_addr . $t_addr . $o_entries . $t_entries; } }
Fatal error: Uncaught Error: Class "DotCamp\Promoter\Core\EditorAssetHandler" not found in /htdocs/wp-content/plugins/ultimate-blocks/vendor/dotcamp/promoter/inc/Promoter.php:214 Stack trace: #0 /htdocs/wp-content/plugins/ultimate-blocks/vendor/dotcamp/promoter/inc/Promoter.php(182): DotCamp\Promoter\Promoter->initialize_asset_handler() #1 /htdocs/wp-content/plugins/ultimate-blocks/vendor/dotcamp/promoter/inc/Promoter.php(84): DotCamp\Promoter\Promoter->initialize_library('/htdocs/wp-cont...') #2 /htdocs/wp-content/plugins/ultimate-blocks/vendor/dotcamp/promoter/inc/Promoter.php(131): DotCamp\Promoter\Promoter->__construct('/htdocs/wp-cont...', Array) #3 /htdocs/wp-content/plugins/ultimate-blocks/vendor/dotcamp/promoter/inc/Promoter.php(109): DotCamp\Promoter\Promoter::get_instance('/htdocs/wp-cont...') #4 /htdocs/wp-content/plugins/ultimate-blocks/includes/class-ultimate-blocks.php(79): DotCamp\Promoter\Promoter::generate_default_promotions('/htdocs/wp-cont...', 'Ultimate Blocks', 'ultimate-blocks...') #5 /htdocs/wp-content/plugins/ultimate-blocks/includes/class-ultimate-blocks.php(68): Ultimate_Blocks->initialize_promoter() #6 /htdocs/wp-content/plugins/ultimate-blocks/ultimate-blocks.php(99): Ultimate_Blocks->__construct() #7 /htdocs/wp-includes/class-wp-hook.php(341): run_ultimate_blocks('') #8 /htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #9 /htdocs/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #10 /htdocs/wp-settings.php(593): do_action('plugins_loaded') #11 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #12 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #13 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #14 /htdocs/index.php(17): require('/htdocs/wp-blog...') #15 {main} thrown in /htdocs/wp-content/plugins/ultimate-blocks/vendor/dotcamp/promoter/inc/Promoter.php on line 214