John Huebner
Forum Replies Created
-
Forum: Plugins
In reply to: [CMB2] Migration (ACF to CMB2)Thanks for the plug Stagger Lee. It should be possible to convert ACF fields of any kind to standard WP postmeta fields. Although I doubt that it will work if CMB2 stores data in any special ways.
For example, ACF stores multiselect fields as a serialized array and my converter will put these into multiple DB entries, the way WP generally does. It can convert repeater fields, but once again each row becomes multiple entries and you loose the ability to match the values in the same row.
I have built hooks into the plugin that will let you do things that the plugin will not already do and build data to be converted in ways that are more specific and cannot be done generically. I hadn’t actually thought about using to convert to other plugins, my main purpose for creating the plugin was to make it easier to search ACF fields using WP_Query. But I wouldn’t mind input if any bugs are found.
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Query database whe another field changesLike I’ve said on other issues, My needs for building this plugin were simple and I like simple tools. I just publish the ones that I think others might find useful. This plugin is available on GitHub https://github.com/Hube2/contact-form-7-dynamic-select-extension and anyone that wants to make it more complicated is free to fork it and if changes are within my goals then I’d be happy to accept pull requests and give credit to those making improvements.
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Manually set default selectedNew version includes these changes
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Allow multiple selections not working?The plugin has been updated here
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Allow multiple selections not working?There was a bug in the code that I corrected when I made it possible to set a default value but these changes have not been updated to the WP repository yet. I will try to find some time to bring the updates over. You can get the current version right now from https://github.com/Hube2/contact-form-7-dynamic-select-extension.
I apologize to anyone seeing this issue, it’s been a hectic couple of months
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Query database whe another field changesThis cannot be done with this plugin. This would require detecting changes in any other field and making an AJAX call each time there is a change and then updating the select field accordingly. This is not something that I’m likely to build into this plugin.
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Manually set default selectedI have added a way to specify the default values of a select. For anyone that’s interested in this, please download and install the latest version from GitHub and test it out, let me know if this works for you.
https://github.com/Hube2/contact-form-7-dynamic-select-extension
How it works. When returning the values to use for the select field from your filter return add an index to the array of
defaultwith either a single value or an array of values to be selected by default. For more information on adding this index see the example filter in the example filter file that’s included with the plugin.If this satisfies the need to be able to set defaults I will update the plugin here with the changes.
~JH
Forum: Plugins
In reply to: [Dynamic Select for Contact Form 7] Label instead of value in mailNo, there is no resolution to this issue.
When I created this plugin, the reason I created it and the use I created for was in order to do something else based on the value selected. Specifically, to send the email to different recipients based on the value selected.
If my purpose for this field was only to insert the selected values into an email then I would set the values and labels returned by my filter so that the value and label were the same or the value was what I wanted to insert into an email.
I’m not sure what I’d do in the case where I needed both the value and the label.
I understand that there may be other ways that an add on like this could be used. I have looked into adding this, but I do not have enough knowledge of CF7 to figure out what I need to change and I don’t have a need for it. I don’t have a lot of time for working on things that I don’t need.
To be honest, if I new what CF7 hook to add a filter to in order to return the label instead of the value when CF7 is adding the value to the email it would probably be simple, but I’ve dug around in CF7 and can’t seem to work out where this happens and I don’t have the time to continue digging.
If there is anyone out there that has the need for this add on to do more than it does and also has the time and knowledge to do so I have this plugin set up on GitHub and would gladly accept pull requests from people that want to improve it, as long as they plan on sticking around to help correct any issues that may come up with those improvements.
When I create a plugin it is because I have a need for the functionality that it provides and because I can’t find something that already does what I need to do. If I think that it might be useful to others in the community then I make them public. It’s not that I don’t want to improve them, it simply that I don’t have the time to spend on making improvements that don’t have a personal need for.
Forum: Plugins
In reply to: [Custom Post Type UI] Can't Delete a Custom Post type with spacesI ended up here after reading about the issue with spaced over on github and just thought I would throw in a comment about dashes vs underscores.
Adding columns when a post type name contains dashes vs underscores works fine, or at leas I’ve not had any problems with it working. I’ve created several like “case-study”, “office-location” and “{COMPANYNAME-products}” without any issues adding custom columns to the admin page. There are also other popular plugins that also use dashes in post type slugs without any reported problems, for example ACF uses “acf-field-group”.
I think that this statement in the codex is incorrect.
~JH
Forum: Plugins
In reply to: [Theme Check] WARNING: file_get_contents was found in…Thanks for the reply, I’ll keep looking.
The JSON files I’m using are generated by another tool. If I keep them in the format they’re created I can easily import them into the same tool, make changes and export them again. Makes altering the settings quick and easy, no extra work is required and that’s the way I’d like to keep it. If I put them in a php array, which I could do, then I’d need to rebuild the settings in the other tool from scratch every time I want to make a modification.
To be honest, the only reason that I’m using the theme check plugin is just in case someone else decides to check my starter theme. It’s not something I plan on publishing on the WP theme repo, there are other reasons why it would not be accepted that I’m not about to compromise on. It’s built for the way that I build sites. I was just trying to see if I could clear up the red flags and using the plugin to make sure I didn’t have anything drastically wrong that might cause a problem for anyone, or for myself for that matter.
Forum: Plugins
In reply to: [Theme Check] WARNING: file_get_contents was found in…These are local JSON files. These files hold settings. The purpose of these files is to increase performance so that the complicated arrays do not need to be built from the database every time.
If I need to open a remote connection to read the file I may as well connect to the db every time.
Yes, there are times when a theme needs to be able to read local files, just because some people don’t see them doesn’t mean they’re not there.
Let me know if there is a way to do this, other than using a remote connection, that does not raise a red flag.
I was checking on this myself, and you were originally correct. There was a PHP notice with php error reporting on. I have removed the two lines that set the field as invalid that I left in place to let this plugin keep working with the older version of CF7. It really be fixed now.
Forum: Plugins
In reply to: [Dynamic Recipient for Contact Form 7] Dynamic Recipient using custom fieldYes, this is possible. The 3 plugins that I developed for CF7, this one, the dynamic select field and the my hidden field were specifically created because I use ACF and I needed this functionality.
The site that they were developed for has an ACF repeater fields. This field has 2 sub fields where the client can add a “Subject” and an “Email Address”. The subjects are dynamically generated into the subject select box on the form and the email from the form is sent to the email address based on what is selected.
This plugin requires the existence of a couple of hidden fields. These hidden fields can be created with either my hidden field plugin or the dynamic text extension plugin.
Glad to take the time, and happy that you it worked out for you.
~JH
Forum: Plugins
In reply to: [jQuery Colorbox] Sutible Replacement?Wow, that was 4 months ago.
This is what I remember.
At the time this plugin was not working, and had not been updated to work on the then newest version of WP. We transferred the content from an older installation not knowing that this plugin was actually being used. The new site had been live for almost 2 months before anyone noticed. The site is a multisite installation with 10 sites and hundreds of pages on each site, one site has almost 1000 pages. This plugin was used on a single page of all of these sites and pages. I had a deadline measured in days to get it fixed. I posted my question and gave it several days and then moved on and found another solution. I never checked back.
I couldn’t tell you if it’s working now or exactly what the problem was, only that it did not work and I needed a solution quickly.