Changeset 2860872
- Timestamp:
- 02/06/2023 02:25:00 PM (3 years ago)
- Location:
- comoquiero/trunk
- Files:
-
- 4 edited
-
comoquiero.php (modified) (1 diff)
-
comoquiero.php.bu (modified) (7 diffs)
-
readme.txt (modified) (1 diff)
-
readme.txt.bu (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
comoquiero/trunk/comoquiero.php
r2860841 r2860872 2 2 /* 3 3 * Plugin Name: Qcart 4 * Version: 23.02.061 2584 * Version: 23.02.061427 5 5 * Author: ComoQuiero 6 6 * Author URI: https://qcart.app -
comoquiero/trunk/comoquiero.php.bu
r2860841 r2860872 2 2 /* 3 3 * Plugin Name: Qcart 4 * Version: 23.02.06125 24 * Version: 23.02.061258 5 5 * Author: ComoQuiero 6 6 * Author URI: https://qcart.app … … 12 12 // stackoverflow.com/questions/6127559/wordpress-plugin-call-to-undefined-function-wp-get-current-user 13 13 add_action('init', function () { 14 add_action('wp_head', "qcart_head"); 14 15 15 16 if (is_admin()) { … … 20 21 21 22 // fetch("/wp-admin/admin-ajax.php?action=new", { method: "POST", body: JSON.stringify({ action: "new" }) }); 22 add_action('wp_ajax_nopriv_new', " newDomain");23 add_action('wp_ajax_nopriv_new', "qcart_newDomain"); 23 24 24 25 // fetch("/wp-admin/admin-ajax.php?action=domain", { method: "POST", body: JSON.stringify({ action: "domain" }) }); 25 add_action('wp_ajax_nopriv_domain', " changeDomain");26 add_action('wp_ajax_nopriv_domain', "qcart_changeDomain"); 26 27 27 28 // fetch("/wp-admin/admin-ajax.php?action=postsync", { method: "POST", body: JSON.stringify({ action: "postsync" }) }); 28 add_action('wp_ajax_nopriv_postsync', " postSync");29 add_action('wp_ajax_nopriv_postsync', "qcart_postSync"); 29 30 30 31 }); 31 32 32 function newDomain()33 function qcart_newDomain() 33 34 { 34 35 $inputJSON = file_get_contents('php://input'); … … 43 44 } 44 45 45 function changeDomain()46 function qcart_changeDomain() 46 47 { 47 48 $inputJSON = file_get_contents('php://input'); … … 60 61 } 61 62 62 function postSync()63 function qcart_postSync() 63 64 { 64 65 // wordpress.stackexchange.com/questions/307193/admin-ajax-php-doesnt-work-when-using-post-data-and-axios … … 228 229 // return "<div class='$q'></div>"; 229 230 // }); 230 231 } 232 233 function qcart_head() 234 { 231 235 // LOCATION.SEARCH 232 236 $q = ""; … … 252 256 } 253 257 254 // INJECT SCRIPT 255 wp_enqueue_script('qcart', plugins_url("js/qcart.js?$q", __FILE__), array(), time(), true); 256 } 258 echo "<script>!function (e, f, u) { e.async = 1; e.src = u; f.parentNode.insertBefore(e, f); }(document.createElement('script'), document.getElementsByTagName('script')[0], 'https://qcart.app/btn.js?trg=any&$q');</script>"; 259 } -
comoquiero/trunk/readme.txt
r2860841 r2860872 4 4 Author URI: https://qcart.app 5 5 Tested up to: 6.1 6 Stable tag: 23.02.061 2586 Stable tag: 23.02.061427 7 7 License: GPLv2 or later 8 8 -
comoquiero/trunk/readme.txt.bu
r2860841 r2860872 4 4 Author URI: https://qcart.app 5 5 Tested up to: 6.1 6 Stable tag: 23.02.06125 26 Stable tag: 23.02.061258 7 7 License: GPLv2 or later 8 8
Note: See TracChangeset
for help on using the changeset viewer.