????? ???? ?? AJAX? ???? WordPress?? ??? ?? ???? ????? ??
Dec 06, 2024 am 11:10 AM1??:
HTML ???? ??? ????:
<div> <p>display all tabs or subjects container:<br> </p> <pre class="brush:php;toolbar:false"><!-- Container to display worksheets --> <div> <p><strong>Step-2:</strong><br> create js file:<br> </p> <pre class="brush:php;toolbar:false">jQuery(document).ready(function ($) { // Fetch Subjects on any checkbox change $('.subject-filter').on('change', function () { // Gather all selected grades var taxonomy = $(this).data('taxonomy'); // Taxonomy name var terms = []; // Array to hold selected terms $('.subject-filter:checked').each(function () { terms.push($(this).val()); }); // Fetch Subjects for selected grades fetchSubjects(taxonomy, terms); }); // Function to fetch Subjects function fetchSubjects(taxonomy = '', terms = []) { $.ajax({ url: ajax_object.ajax_url, type: 'POST', data: { action: 'fetch_subjects', nonce: ajax_object.nonce, taxonomy: taxonomy, terms: terms, // Send array of selected terms }, beforeSend: function () { $('.worksheet-container').html('<p>Loading...</p>'); }, success: function (response) { if (response.success) { $('.worksheet-container').html(response.data.html); } else { $('.worksheet-container').html('<p>' + response.data.message + '</p>'); } }, error: function () { $('.worksheet-container').html('<p>An error occurred. Please try again.</p>'); }, }); } });
3??:
function.php?? ?? ???:
// ???? ???? ?? AJAX ?? ??(????? ?? ???? ???? ?? ??) add_action('wp_ajax_fetch_subjects', 'fetch_subjects'); add_action('wp_ajax_nopriv_fetch_subjects', 'fetch_subjects'); ?? fetch_subjects() { // ??? ?? nonce? ?????. if (!isset($_POST['nonce']) || !wp_verify_nonce($_POST['nonce'], 'ajax_nonce')) { wp_send_json_error(array('message' => 'Nonce ??? ??????.')); wp_die(); } // AJAX ???? ?? ? ??? ?????. $?? = isset($_POST['??']) ? sanitize_text_field($_POST['taxonomy']) : ''; $terms = isset($_POST['terms']) ? array_map('sanitize_text_field', $_POST['terms']) : array(); // ?? ?? ?? $args = ??( '??? ??' => '????', '???_????' => -1, // ?? ???? ?????. ); // ??? ???? ??? ?????. if (!empty($taxonomy) && !empty($terms)) { $args['tax_query'] = ??( ??( '??' => $??, '??' => '??', '??' => $terms, // ??? ??? ??? ?????. '???' => 'IN', // ??? ?? ? ??? ?? ), ); } // WP_Query? ???? ???? ?????. $?? = ??? WP_Query($args); // ???? ?????? ?? if ($query->have_posts()) { $html = ''; while ($query->have_posts()) { $query->the_post(); // ??? HTML? ?????. $html .= '<div>
? ??? ????? ???? ?? AJAX? ???? WordPress?? ??? ?? ???? ????? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











TOSECURELYHANDLEAUSTENCENDACTIONANDACTERIZINGINPHP, FORCUCTSESTEPS : 1. ALWAYSHASHPASSWORTHPASSWORD_HASH () ? VERVERIFYUSINGPANSWORD_VERIFY (), usePREPAREDSTATEMENTSTOPREVENTSQLINGERGED, andSTOREUSERSESSEATAIN $ _SESSIONSAFTERLOGIN.2.impleplempletrole ?? ACCESSC

PHP?? ?? ???? ???? ????? ??? ?? ??? ???? ?? ??? ??? ??? ???? ????. 1. finfo_file ()? ???? ?? ?? ??? ???? ???/jpeg? ?? ?? ?? ? ?????. 2. uniqid ()? ???? ??? ?? ??? ???? ? Web ?? ????? ??????. 3. php.ini ? html ??? ?? ?? ??? ???? ???? ??? 0755? ?????. 4. Clamav? ???? ???? ???? ??? ??????. ??? ??? ?? ???? ????? ???? ?? ??? ????? ???? ??? ? ??? ?????.

PHP?? ==? ==? ?? ???? ?? ??? ??????. == ?? ??? ?? ?? ?????. ?? ??, 5 == "5"? true? ????, ?? ??? ???? ?? ?? ??? ????? ????? (? : 5 === "5"? false? ?????. ?? ?????? ===? ? ???? ?? ?????? == ?? ??? ??? ???? ?????.

PHP?? ?? ??? ??? ???? ??? ??? ????. 1. ?? ??? ?? ? ?? ??? ??? ???? ???? ??? ? ????. ??? ??? ???? ????? ????? ???? ????. 2. ?? ?? ?? - ??, ??? ???? ?? ??? ?????. 3. ?? ???? ??? ??? ???? ??? ??? ?????. 4. Division? / ??? ???? 0?? ??? ?? ????? ??? ?? ??? ?? ? ? ????. 5. ???? ??? ???? ?? ?? ? ?? ??? ???? ? ??? ? ???, ??? ?? ? ? ??? ??? ???? ?????. ? ???? ???? ???? ??? ??? ??? ???? ?? ??? ? ??????? ????.

?, PHP? ?? ?? ?? ?????? ?? MongoDB ? Redis? ?? NOSQL ??????? ?? ??? ? ????. ?? MongoDBPHP ???? (PECL ?? Composer? ?? ??)? ???? ????? ????? ??? ?????? ? ???? ????? ??, ??, ?? ? ?? ??? ?????. ??, Predis ????? ?? Phpredis ??? ???? Redis? ???? ?? ? ?? ? ??? ???? ??? ????? Phpredis? ???? ?? Predis? ?? ??? ?????. ? ? ?? ??? ???? ? ????? ????.

tostaycurrentwithphpdevelopments ? bestpractices, followkeynewssources lifephp.netandphpweekly, adgytwithcommunitiesonforumsandconferences, readlingupdated andgrad indewfeatures, andreadorcontributetoopensourceproceprosts.first

phpbecamepupularforwebdevelopmentduetoiteofleneflening, whithhtml, wididepreadhostingsupport, andalargeecosystemincludingframeworkslikelaravelandcmsplatformsformslikewordpress.itexcelsinhandlingformsubmissions, managingussess, interptisussivers, ?? ???

TOSETTHERIGHTTIMEZONEINPHP, usedate_default_timezone_set () functionattStartOfyourscriptwitHavalidInlifiersuchas'America/new_york'.1.edate_default_timezone_set () beforeanydate/timeFunctions.2
