umbaumba
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple CSV/XLS Exporter] ccsve_generate_query_callback filterHi, wpcf-time-entry-date custom field contains numerical timestamp values like “1609977600”. It is exported correctly by Simple CSV/XLS Exporter.
wpcf-time-entry-date-x custom field contains textual strings like “01/28/2022”. It is also exported correctly by Simple CSV/XLS Exporter.
Why the below code doesn’t work? It should only change the column name…
function ccsve_generate_query_callback($query_arr) { if (isset($_REQUEST['wpcf-time-entry-date-x']) && $_REQUEST['wpcf-time-entry-date-x']) { $query_arr['meta_key'] = 'wpcf-time-entry-date'; $query_arr['meta_value'] = $_REQUEST['wpcf-time-entry-date-x']; } return $query_arr; } add_filter('ccsve_generate_query', 'ccsve_generate_query_callback');
cheers
Forum: Plugins
In reply to: [Simple CSV/XLS Exporter] ccsve_generate_query_callback filterHi Shambix, I’ve created a secondary custom field called wpcf-time-entry-date-x, there I’m storing an already formatted date. I selected that field in the plugin settings but then I want to display the values from wpcf-time-entry-date-x under the column wpcf-time-entry-date. So I set up the function:
function ccsve_generate_query_callback($query_arr) { log_me('----ccsve_generate_query_callback---'); if (isset($_REQUEST['wpcf-time-entry-date-x']) && $_REQUEST['wpcf-time-entry-date-x']) { $query_arr['meta_key'] = 'wpcf-time-entry-date'; $query_arr['meta_value'] = $_REQUEST['wpcf-time-entry-date-x']; } return $query_arr; } add_filter('ccsve_generate_query', 'ccsve_generate_query_callback');
It still doesn’t work for me.
I’ve activated WP_DEBUG and I’m using log_me() function to display errors (https://www.smashingmagazine.com/2011/03/ten-things-every-wordpress-plugin-developer-should-know/). I’ve added a log_me(‘—-ccsve_generate_query_callback—‘); that should display ‘—-ccsve_generate_query_callback—‘ in /wp-content/debug.log. It doesn’t, the only output I get there is:
[01-Feb-2022 14:18:41 UTC] PHP Notice: Undefined offset: 23 in /wp-content/plugins/simple-csv-xls-exporter/process/simple_csv_xls_exporter_csv_xls.php on line 265
thanks for your patience
Forum: Plugins
In reply to: [Simple CSV/XLS Exporter] ccsve_generate_query_callback filterHi, you sent me documentation about WP_Query, but I’m not running a query. I assume your hook is getting the field wpcf-time-entry-date value by $_REQUEST[‘wpcf-time-entry-date’]; then I just want to manipulate tha timestamp value it contains with standard PHP date() function. You can check WP documentation about date format here:
Actually, I’m using the same function $date = date(‘Y/m/d’, $timestamp); in a shortcode on the same website and it works fine.
I’ve activated WP_DEBUG and I’m using log_me() function to display errors (https://www.smashingmagazine.com/2011/03/ten-things-every-wordpress-plugin-developer-should-know/). I don’t see any output of your filter ccsve_generate_query in the debug.log. It seems it is not running.
What is ccsve_export_returns for?
cheers
Forum: Plugins
In reply to: [Simple CSV/XLS Exporter] ccsve_generate_query_callback filter`Hi, thanks for the quick answer.
Toolset stores the timestamp in wpcf-time-entry-date custom field and Simple CSV/XLS Exporter exports it correctly when it is selected in settings.
What I need is to edit the custom field value to export it as a readable date with format Y/m/d.
It seems that the filter is not working at all. Is it possible?
cheers
Forum: Plugins
In reply to: [Social Share Icons & Social Share Buttons] Stop showing share buttonsHey, I fixed the issue. For some reason the plugin config was lost. Maybe because we deactivated and reactivated it?
cheers
Forum: Plugins
In reply to: [Social Share Icons & Social Share Buttons] Stop showing share buttonsHey, I deactivated all the plugins and tested your plugin with “Twenty Twenty” and “Twenty Nineteen” themes. It is not working for me. Maybe you should give a look… or I finally switch to anothr plugin.
thanks
Forum: Plugins
In reply to: [Social Share Icons & Social Share Buttons] Stop showing share buttonsHi, maybe WordPress updated to 5.3.1, then we update Toolset plugins and maybe some other.
cheers
Hi, I did it by customizing Autocomplete plugin. You have to edit autocomplete-for-relevanssi.php file and replace this code with my code:
var searchInputs = document.getElementsByName("s"); for(var i = 0; i < searchInputs.length; i++) { var awesomplete = new Awesomplete(searchInputs[i]); awesomplete.list = ["<?php echo $iwords_list; ?>"]; awesomplete.minChars = <?php echo $afr_min_chars; ?>; awesomplete.maxItems = <?php echo $afr_max_suggestions; ?>; }
- This reply was modified 7 years, 4 months ago by umbaumba.
Forum: Plugins
In reply to: [SoundCloud Shortcode] shortcode does not work with website SSLI’ve the same problem. On Chrom only works setting Widget Type: Flash, but it doesn’t work fine with IOS. HTML5 setting doesn’t work for Chrome.