function cnb_show_condition_placeholder_action() { const optionSelected = jQuery('#cnb_condition_match_type').val() let placeholderText if(optionSelected === 'SIMPLE') { placeholderText = '/blog/' } else if(optionSelected === 'EXACT') { placeholderText = 'https://www.example.com/sample-page/' } else if(optionSelected === 'SUBSTRING') { placeholderText = 'category/' } else if(optionSelected === 'REGEX') { placeholderText = '/(index|about)(\?id=[0-9]+)?$' } else if(optionSelected === 'COUNTRY_CODE') { placeholderText = '2 letter country code (e.g. NL)' } jQuery('#cnb_condition_match_value').attr('placeholder', placeholderText) } /** * Show an example condition in the form field for each of the match types */ function cnb_show_condition_placeholder() { cnb_show_condition_placeholder_action() jQuery('#cnb_condition_match_type').on('change', function () { cnb_show_condition_placeholder_action() }) } /** * * @param {HTMLElement} element */ function cnb_condition_type_change_action(element) { // Get the select item const selected = jQuery(element).find(":selected") // Get the new option const value = selected.val() // Hide all "conditionType" jQuery('.conditionType').attr('hidden', 'hidden') // Show all "conditionType_TYPE" jQuery('.conditionType_' + value).removeAttr('hidden') // Ensure the selected item is NOT a hidden item // If it is, select the first non-hidden version const matchTypeEle = jQuery('#cnb_condition_match_type') const selectedMatchType = matchTypeEle.find(":selected") if (selectedMatchType.is('[hidden="hidden"]')) { const firstNotHidden = matchTypeEle.find('option[hidden!="hidden"]') if (firstNotHidden.length) { firstNotHidden.first().attr('selected', 'selected') // Also clear the Match value, since it's no longer valid jQuery('#cnb_condition_match_value').val('') cnb_show_condition_placeholder_action() } } } function cnb_condition_type_change_listener() { const ele = jQuery('#cnb_condition_condition_type') if (!ele.length) { return } ele.on('change', function (element) { cnb_condition_type_change_action(element.target) }) cnb_condition_type_change_action(ele[0]) } /** * This calls the admin-ajax action called 'cnb_delete_condition' */ function cnb_delete_condition() { jQuery('tbody[data-wp-lists="list:cnb_list_condition"]#the-list span.delete a[data-ajax="true"]') .on('click', function(){ // Prep data const id = jQuery(this).data('id') const bid = jQuery(this).data('bid') const data = { 'action': 'cnb_delete_condition', 'id': id, 'bid': bid, '_ajax_nonce': jQuery(this).data('wpnonce'), } // Send remove request jQuery.post(ajaxurl, data) .done(() => { // Remove container const action_row = jQuery(this).closest('tr') jQuery(action_row).css("background-color", "#ff726f") jQuery(action_row).fadeOut(function() { jQuery(action_row).css("background-color", "") jQuery(action_row).remove() // Special case: if this is the last item, show a "no items" row const remaining_items = jQuery('table.cnb_list_conditions #the-list tr').length if (!remaining_items) { // Add row jQuery('table.cnb_list_conditions #the-list').html('You have no display rules set up. This means that your button will show on all pages.

' + '

Click the Add display rule button above to limit the appearance. You can freely mix and match rules to meet your requirements.

') } }) }) // Remove ID from Button array jQuery('input[name^="conditions['+id+']"').remove() return false }) } jQuery( function() { cnb_delete_condition() cnb_show_condition_placeholder() cnb_condition_type_change_listener() }) contato, Author at Incentive Academy

anabolizantes comprar online 23

Comparativa De Los Mejores Precursores De Testosterona Naturales Descargar información del fabricante sobre el producto.Información para aquellos que deseen compra.. Descargar información del fabricante sobre el producto.Clenbuterol 40 mg es un potente broncodilatad.. Certificado como entrenador personal, aporta su experiencia y sabiduría tanto en el desarrollo de productos como en la creación de contenido informativo […]

Sp5der Clothing – Defy the Ordinary Spider┬о Store

Step into the Spotlight with Sp5der Hoodies Seeking fashionable hoodies that get noticed? Check out our Sp5der selection. Our hoodies are made with each style and features under consideration. Crafted from great-good quality resources, they offer longevity and luxury that continues. Each and every hoodie within our Sp5der collection functions special design particulars that set […]

18 nasty approaches to generate Time for Intercourse in a Busy Plan

Having a tough time creating time for sex within timetable? Try these guidelines and you should observe how efficiently effortless it can be to help keep the sizzle live, 24/7! They do say that time is silver, but if you’re active with children, cleaning, actual work, the everyday commute, and all the rest of it […]

How can students use Reddit to overcome conflicts with classmates in schoolwork

Secondly, bypass ‘free proofreading’ offers. Provide your own argumentation rather a lot of people’s. Be definitely you possess a picture id so that you can compare things with. However, don’t undoubtedly use a person’s same niche in all your posts. Vary sentence in your essay structure also word approach. Again through process of checking with […]

How To Answer A Essay Question On A Test

College students: finding a job and success Are you planning on having a resume written by a certified professional writer in the near future? If you are in the market for a new resume or cv, read on as this is very important – especially in this economy. Do your due diligence if you are […]

DrPen m8 vs a6s – 5 things you should know

When comparing the Dr. Pen M8 and A6S micro-needling devices, there are several factors to consider to ensure you choose the right option for your skincare needs. Here are five key things you should know: 1. Technology and Features: – The Dr. Pen M8 uses advanced technology with a digital display and adjustable needle depth […]