ivan1993
Forum Replies Created
-
Use me as a dislike button
But why is the plugin so sensitive to other plugins may i ask?
so i commented them all out except for the “save_post” one ill see if it works
so i found these would it be any of these that are causing the purge to be sensitve to “other plugins”
add_filter( 'cron_schedules', array( add_action( 'w3_dbcache_cleanup', array( add_action( 'publish_phone', array( add_action( 'wp_trash_post', array( add_action( 'save_post', array( add_action( 'clean_post_cache', array( add_action( 'comment_post', array( add_action( 'edit_comment', array( add_action( 'delete_comment', array( add_action( 'wp_set_comment_status', array( add_action( 'trackback_post', array( add_action( 'pingback_post', array( add_action( 'switch_theme', array( add_action( 'edit_user_profile_update', array( add_action( 'delete_blog', array( add_action( 'delete_post', array( add_filter( 'w3tc_admin_bar_menu', add_filter( 'w3tc_usage_statistics_metrics', array( add_filter( 'w3tc_usage_statistics_sources', array(found them here
wp-content\plugins\w3-total-cache\DbCache_Plugin.phpHey yes I was just thinking about that. So if there is something else hooking it that means the plugin itself is sensitive to a certain hook (has an “add_action” call). Since I’m pretty much at the end of my rope here I’m thinking of just going into the plugin code and removing that action altogether (as is completely unesesary in my setup). So where could I find the most likely add_action trigger for me to remove it manually may I ask? In the mean time ill have a look to see if i can find it
No most of the cache files are back to “old” state something is off
Regarding “Performance>Page Cache>Purge Policy.”
I unchecked
-Posts page
-Post page
-Blog feed
So hopefully I will wake up to a bright new (yet cached) world tomorrow 🙂Regarding “Performance>General Settings>Debug”
I see log are only available for paid members- This reply was modified 4 years, 2 months ago by ivan1993.
Thanks but my guess is the “old” suffix is not being added because someone is updating the posts its happening i would guess based on a periodic expiry or something to that nature. The reason I say this, once again, is because I very much doubt the client is updating 7 pages every couple hours (this is how often the page cache files seem to get “old” suffix).
I struggle for ages with this and below is both my own answer
wp-content\themes\greenbox-child\single-product\add-to-cart\variable.php
<div class="custom-select dropdown" style="width:200px;" tabindex="1"> <?php wc_dropdown_variation_attribute_options( array( 'options' => $options, 'attribute' => $attribute_name, 'product' => $product, ) ); ?> </div>wp-content\themes\greenbox-child\js\custom-script.js
if (1==1) { // boostrap_style document.addEventListener("DOMContentLoaded", function(){ //.... var select_x, select_i, select_j, select_l, select_ll, selElmnt, select_a, select_b, select_c; /*look for any elements with the class "custom-select":*/ select_x = document.getElementsByClassName("custom-select"); select_l = select_x.length; for (select_i = 0; select_i < select_l; select_i++) { selElmnt = select_x[select_i].getElementsByTagName("select")[0]; select_ll = selElmnt.length; /*for each element, create a new DIV that will act as the selected item:*/ select_a = document.createElement("DIV"); if (1==1) { select_a.className = "aClassName"; } if ("new"=="new") { select_a.setAttribute("class", "select"); select_a.innerHTML = '<span>'+selElmnt.options[selElmnt.selectedIndex].innerHTML+'</span><i class="fa fa-chevron-left"></i>'; } else { select_a.setAttribute("class", "select-selected"); select_a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML; } select_x[select_i].appendChild(select_a); /*for each element, create a new DIV that will contain the option list:*/ if ("new"=="new") { select_b = document.createElement("ul"); select_b.className = "bClassName"; select_b.setAttribute("class", "dropdown-menu"); } else { select_b = document.createElement("DIV"); select_b.setAttribute("class", "select-items select-hide"); } for (select_j = 1; select_j < select_ll; select_j++) { /*for each option in the original select element, create a new DIV that will act as an option item:*/ if ("new"=="new") { select_c = document.createElement("li"); select_c.className = "cClassName"; } else { select_c = document.createElement("DIV"); } select_c.innerHTML = selElmnt.options[select_j].innerHTML; // select_c.addEventListener("click", function(e) { // /*when an item is clicked, update the original select box, // and the selected item:*/ // var y, select_i, k, s, h, sl, yl; // s = this.parentNode.parentNode.getElementsByTagName("select")[0]; // sl = s.length; // h = this.parentNode.previousSibling; // for (select_i = 0; select_i < sl; select_i++) { // if (s.options[select_i].innerHTML == this.innerHTML) { // s.selectedIndex = select_i; // h.innerHTML = this.innerHTML; // y = this.parentNode.getElementsByClassName("same-as-selected"); // yl = y.length; // for (k = 0; k < yl; k++) { // y[k].removeAttribute("class"); // } // this.setAttribute("class", "same-as-selected"); // break; // } // } // h.click(); // }); select_b.appendChild(select_c); } select_x[select_i].appendChild(select_b); // select_a.addEventListener("click", function(e) { // /*when the select box is clicked, close any other select boxes, // and open/close the current select box:*/ // e.stopPropagation(); // closeAllSelect(this); // this.nextSibling.classList.toggle("select-hide"); // this.classList.toggle("select-arrow-active"); // }); } // function closeAllSelect(elmnt) { // /*a function that will close all select boxes in the document, // except the current select box:*/ // var select_x, y, select_i, xl, yl, arrNo = []; // select_x = document.getElementsByClassName("select-items"); // y = document.getElementsByClassName("select-selected"); // xl = select_x.length; // yl = y.length; // for (select_i = 0; select_i < yl; select_i++) { // if (elmnt == y[select_i]) { // arrNo.push(select_i) // } else { // y[select_i].classList.remove("select-arrow-active"); // } // } // for (select_i = 0; select_i < xl; select_i++) { // if (arrNo.indexOf(select_i)) { // select_x[select_i].classList.add("select-hide"); // } // } // } // /*if the user clicks anywhere outside the select box, // then close all select boxes:*/ // document.addEventListener("click", closeAllSelect); }); jQuery(document).ready(function( $ ) { // $ Works! You can test it with next line if you like // console.log($); /*Dropdown Menu*/ $('.dropdown').click(function () { $(this).attr('tabindex', 1).focus(); $(this).toggleClass('active'); $(this).find('.dropdown-menu').slideToggle(300); }); $('.dropdown').focusout(function () { $(this).removeClass('active'); $(this).find('.dropdown-menu').slideUp(300); }); $('.dropdown .dropdown-menu li').click(function () { $(this).parents('.dropdown').find('span').text($(this).text()); if ("new"=="new") { // $('.formselect').val('single').trigger('change'); // $(this).parents('.dropdown').find('input').attr('value', $(this).attr('id')); // $(this).parents('.dropdown').find('select').val($(this).text()).trigger('change'); // $(this).parents('.dropdown').find('select').eq(0).val( $(this).text() ).trigger('change'); $(this).parents('.dropdown').find('select').eq(0).val( $(this).text() ).change(); if(typeof(state["variations"][$(this).text()]) != "undefined") { var variation_id = state["variations"][$(this).text()]; $('input.variation_id').val(variation_id); } // var var_id = $('input.variation_id').val(); // alert('You just selected variation #' + var_id); // $(this).parents('.dropdown').find('select').eq(0).val( $(this).text() ).change(); // $(this).parents('.dropdown select').val($(this).text()).change() // $(this).parents('.dropdown select').trigger('change'); // alert($(this).parents('.dropdown').find('select').eq(0).id); // alert($(this).text()); // $('input.variation_id').val(); } else { $(this).parents('.dropdown').find('input').attr('value', $(this).attr('id')); } }); /*End Dropdown Menu*/ }); }wp-content\themes\greenbox-child\utility-styles.css
/* ----------------------------- slick_style */ .custom-select select { display: none; } .dropdown { width: 300px; display: inline-block; background-color: #fff; border-radius: 2px; box-shadow: 0 0 2px rgb(204, 204, 204); transition: all .5s ease; position: relative; font-size: 14px; color: #474747; height: 100%; text-align: left } .dropdown .select { cursor: pointer; display: block; padding: 10px } .dropdown .select > i { font-size: 13px; color: #888; cursor: pointer; transition: all .3s ease-in-out; float: right; line-height: 20px } .dropdown:hover { box-shadow: 0 0 4px rgb(204, 204, 204) } .dropdown:active { background-color: #f8f8f8 } .dropdown.active:hover, .dropdown.active { box-shadow: 0 0 4px rgb(204, 204, 204); border-radius: 2px 2px 0 0; background-color: #f8f8f8 } .dropdown.active .select > i { transform: rotate(-90deg) } .dropdown .dropdown-menu { position: absolute; background-color: #fff; width: 100%; left: 0; margin-top: 1px; box-shadow: 0 1px 2px rgb(204, 204, 204); border-radius: 0 1px 2px 2px; overflow: hidden; display: none; max-height: 144px; overflow-y: auto; z-index: 9 } .dropdown .dropdown-menu li { padding: 10px; transition: all .2s ease-in-out; cursor: pointer } .dropdown .dropdown-menu { padding: 0; list-style: none } .dropdown .dropdown-menu li:hover { background-color: #f2f2f2 } .dropdown .dropdown-menu li:active { background-color: #e2e2e2 }- This reply was modified 5 years ago by ivan1993.