Changeset 3128827
- Timestamp:
- 07/31/2024 01:36:13 PM (20 months ago)
- Location:
- quran-text-multilanguage/trunk
- Files:
-
- 4 edited
-
inc/quran_style.php (modified) (2 diffs)
-
inc/template.php (modified) (4 diffs)
-
quran-text-multilanguage.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
quran-text-multilanguage/trunk/inc/quran_style.php
r2827897 r3128827 1 1 <?php 2 2 defined( 'ABSPATH' ) or die( 'Salem aleykoum!' ); 3 if (!defined('REST_REQUEST')) { 3 4 ?> 4 5 6 5 7 6 <style> … … 528 527 } 529 528 </style> 530 531 532 529 <?php 530 } 531 ?> 532 533 -
quran-text-multilanguage/trunk/inc/template.php
r2921936 r3128827 1 <?php 2 if (!defined('REST_REQUEST')) { 3 4 ?> 1 5 <div id="template_quran"> 2 6 … … 191 195 ?> 192 196 <script> 193 jQuery(document).ready(function(e) { 194 var UrlPrevSourate = "?sourate=<?php echo $_GET['sourate'];echo "&lang=".$_GET['lang']."";?>"; 195 history.pushState({ path: this.path }, '', ''+UrlPrevSourate+''); 197 document.addEventListener('DOMContentLoaded', function() { 198 var sourate = "<?php echo $_GET['sourate']; ?>"; 199 var lang = "<?php echo $_GET['lang']; ?>"; 200 var UrlPrevSourate = "?sourate=" + sourate + "&lang=" + lang; 201 history.pushState({ path: window.location.pathname }, '', UrlPrevSourate); 196 202 }); 197 203 </script> … … 206 212 $lang = get_option('quran_languages'); 207 213 ?> 208 <script> 209 var UrlPrevSourate = "?sourate=al-fatiha-1" ; 210 history.pushState({ path: this.path }, '', ''+UrlPrevSourate+'&lang=<?=$lang;?>'); 211 </script> 214 <script> 215 document.addEventListener('DOMContentLoaded', function() { 216 var lang = "<?= $lang; ?>"; 217 var UrlPrevSourate = "?sourate=al-fatiha-1"; 218 history.pushState({ path: window.location.pathname }, '', UrlPrevSourate + '&lang=' + lang); 219 }); 220 </script> 221 212 222 <div id="result"> 213 223 <?php … … 222 232 </div> 223 233 </div> 234 <?php 235 } 236 ?> -
quran-text-multilanguage/trunk/quran-text-multilanguage.php
r2921938 r3128827 7 7 Description: Quran Text Multilanguage translated into 29 languages. Full ajax version and responsive. Fully customizable. More reciter... 8 8 9 Version: 2.3.2 09 Version: 2.3.21 10 10 11 11 Author: Bahmed karim … … 455 455 //LOAD JS FILE 456 456 function add_js_scripts() { 457 wp_enqueue_script( 'jquery' ); 457 458 wp_enqueue_script( 'loadquran', plugin_dir_url(__FILE__).'/js/load_sura.js', array('jquery'), '1.0', true ); 458 459 wp_enqueue_script('msdropdownddjs',plugin_dir_url( __FILE__ ).'js/jquery.dd.js', array('jquery'), '1.0', true); … … 497 498 498 499 499 function qtm_renderquran(){ 500 501 require('inc/quran_style.php'); 502 503 require('inc/template.php'); 504 init_quran(); 505 506 ?> 507 508 509 510 <script language="javascript"> 511 jQuery(document).ready(function(e) { 512 513 try { 514 jQuery("#select_language,#change_sura").msDropDown(); 515 } catch(e) { 516 alert(e.message); 517 } 518 }); 519 </script> 520 521 522 <?php 523 500 function qtm_renderquran() { 501 // Enqueue jQuery 502 wp_enqueue_script('jquery'); 503 504 // Add inline script to ensure jQuery is used 505 $inline_script = " 506 jQuery(document).ready(function($) { 507 try { 508 $('#select_language, #change_sura').msDropDown(); 509 } catch(e) { 510 alert(e.message); 511 } 512 }); 513 "; 514 515 // Enqueue a placeholder script to ensure jQuery is available 516 wp_register_script('qtm-inline', '', [], '', true); 517 wp_enqueue_script('qtm-inline'); 518 519 // Add inline script to the placeholder script 520 wp_add_inline_script('qtm-inline', $inline_script); 521 522 // Include necessary files 523 require_once plugin_dir_path(__FILE__) . 'inc/quran_style.php'; 524 require_once plugin_dir_path(__FILE__) . 'inc/template.php'; 525 526 // Initialize Quran (assuming this is required) 527 init_quran(); 524 528 } 525 529 -
quran-text-multilanguage/trunk/readme.txt
r3128746 r3128827 362 362 363 363 - add Tajik language 364 365 = 2.3.21 366 - fix json error api rest
Note: See TracChangeset
for help on using the changeset viewer.