Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘button_labels’ support for image/upload fields #1173

Closed
aristath opened this issue Nov 27, 2016 · 4 comments
Closed

‘button_labels’ support for image/upload fields #1173

aristath opened this issue Nov 27, 2016 · 4 comments
Milestone

Comments

@aristath
Copy link
Contributor

Issue reported on https://wordpress.org/support/topic/button_labels-support-for-imageipload-fields/

@aristath aristath modified the milestone: 3.0 Apr 23, 2017
@Qodux
Copy link

Qodux commented Jan 5, 2018

Hi,

I really want to not include Kirki in my plugin/theme files (with modified files) and let the recommended option to be installed as a normal WordPress plugin and activate.

As you can see above, I reported an issue on WordPress support forum for Kirki plugin regarding the option to support ‘button_labels’ for image/upload fields. You've said that it's solved starting with 4.2.0 version. Now I have the latest version and ‘button_labels’ doesn't work for image fields.

I've checked the class-kirki-field.php file of an older version edited by me and saw that I added next code wich used to work:

protected $button_labels = array();
and
protected function set_button_labels() { if ( ! is_array( $this->button_labels ) ) { $this->button_labels = array(); } }

I tried to add the code in the latest vesion of plugin 3.0.22 in both class-kirki-field.php and class-kirki-field-image.php files, but seems to not work and 'button_labels' is not working.

Could you check please? Did you remove 'button_labels' because I searched in all plugin files and found nothing.

Thanks in advance.

aristath added a commit that referenced this issue Jan 6, 2018
@aristath
Copy link
Contributor Author

aristath commented Jan 6, 2018

Hey there!

Can you please try using the develop branch now? I just pushed a new commit that should fix this.
I tested using an image control and it works again.
It stopped working recently because the Kirki control is now independent and no longer just an alias for the WP-Core PHP class.

@Qodux
Copy link

Qodux commented Jan 8, 2018

Hi,

I tried it and it works great. Thanks for implementing this again.

Have a nice day!

@Qodux
Copy link

Qodux commented Jan 11, 2018

Hey there,

I used 2.3.7 version of kirki plugin in my unfinished project and for background fields I used 6 separate fields (color, bg image, bg repeat, bg position, bg attachment and bg size). For bg image fields I used the suggestive 'button labels' with 'image' word. You've just added support for 'button labels' for image field again and the default labels now contain 'image' and not 'file'.

Now I'm using the latest develop version and I saw you have a new control - background, which is great, so I started to replace all my old background fields I said above with this one. I noticed that the 'button labels' for image inside background field doesn't contain the suggestive 'image' word. All labels contain 'file'.

Would you take into consideration to replace 'file' with 'image' in future plugin versions since we upload an image here and not a general custom file?

Thanks.

@aristath aristath modified the milestones: 3.0, 3.0.23 Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants