add_action('wp_enqueue_scripts', 'enqueue_watermark_script'); function enqueue_watermark_script() { // فقط در صفحات محصول یا صفحاتی که ویدیو دارن اجرا بشه if (is_product() && is_user_logged_in()) { $current_user = wp_get_current_user(); // دریافت اطلاعات کاربر $user_info = array( 'name' => $current_user->display_name ? $current_user->display_name : 'کاربر مهمان', 'phone' => get_user_meta($current_user->ID, 'billing_phone', true) ? get_user_meta($current_user->ID, 'billing_phone', true) : 'نامشخص', 'national_id' => get_user_meta($current_user->ID, 'national_id', true) ? get_user_meta($current_user->ID, 'national_id', true) : 'نامشخص' ); // ثبت اسکریپت جاوااسکریپت wp_enqueue_script('watermark-script', get_template_directory_uri() . '/js/watermark.js', array(), '1.0', true); // پاس دادن اطلاعات کاربر به جاوااسکریپت wp_localize_script('watermark-script', 'userWatermarkData', $user_info); } }
Warning: Cannot modify header information - headers already sent by (output started at /home/gjjaqztz/public_html/wp-content/themes/hello-elementor/functions.php:414) in /home/gjjaqztz/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php on line 66

Warning: Cannot modify header information - headers already sent by (output started at /home/gjjaqztz/public_html/wp-content/themes/hello-elementor/functions.php:414) in /home/gjjaqztz/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/gjjaqztz/public_html/wp-content/themes/hello-elementor/functions.php:414) in /home/gjjaqztz/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/gjjaqztz/public_html/wp-content/themes/hello-elementor/functions.php:414) in /home/gjjaqztz/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/gjjaqztz/public_html/wp-content/themes/hello-elementor/functions.php:414) in /home/gjjaqztz/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/gjjaqztz/public_html/wp-content/themes/hello-elementor/functions.php:414) in /home/gjjaqztz/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/sitemap/abstract-xml.php on line 69
https://www.hamranj.com/post-sitemap.xml 2025-03-03T17:27:42+00:00 https://www.hamranj.com/page-sitemap.xml 2025-07-22T21:50:44+00:00 https://www.hamranj.com/product-sitemap.xml 2025-07-09T09:52:56+00:00 https://www.hamranj.com/category-sitemap.xml 2025-03-03T17:27:42+00:00