Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Seeing name of widget if show titles is enabled, even if widgettitle is blank #11

Closed
FriendlyWP opened this issue Mar 17, 2015 · 8 comments
Assignees

Comments

@FriendlyWP
Copy link

Hi again - me on the titles thing. I'm having a problem where I have show titles enabled using

add_filter('show_acfw_titles', '__return_true');

But, if the title of the widget is left blank in Appearance > Widgets, the name of the widget itself appears instead. I believe in that instance nothing should appear (that's how it works with other widgets anyway).

For instance, if I create an ACF Widget called "My Pretty Little Widget", with the filter to show titles = true, then drag a new instance of My Pretty Little Widget into the sidebar and leave its title blank, the widget appears in the sidebar with the title My Pretty Little Widget.

I know it's a strange use case because hey, why enable it and then leave it blank? but I know my users will be confused if they leave the field blank and something still appears on the front end. Can you help? Thank you!

@FriendlyWP
Copy link
Author

Also, if the widget title is blank, is there a way for nothing at all to be output (ie no blank <h4 class="widgettitle"></h4>)?

Thanks again!

@daronspence
Copy link
Owner

@FriendlyWP you're definitely right. I thought it would be cool to emulate the way WordPress does it (if no title is available, use a default one) but for custom stuff that doesn't make sense. I'll remove that. ASAP.

@daronspence
Copy link
Owner

Latest commit to master fixes this issue. Sorry about that.

@FriendlyWP
Copy link
Author

Hi Daron,

I just downloaded the Master branch again and tried to reinstall, but I get
this Fatal Error on activation:
Fatal error: Can't use function return value in write context in
C:\Users\Michelle\Documents\Websites\clutterdiet.dev\wp-content\plugins\acf-widgets-master\includes\admin-setup.php
on line 285

Am I doing something wrong? I'm not sure how to upgrade to the latest
version ( or if this is even it - it's still showing as 1.3.1?) other than
wiping out the previous installation and downloading from GitHub.

Thanks for your help!
Michelle

On Wed, Mar 18, 2015 at 2:06 AM, Daron notifications@github.com wrote:

Closed #11 #11.


Reply to this email directly or view it on GitHub
#11 (comment).

Michelle McGinnis
Friendly Web Consulting
http://friendlywebconsulting.com
512.650.8144

@daronspence
Copy link
Owner

Shit. I think I spotted the issue. Regarding the version number, I don't update it until I release the new version in the wild. This ensures everyone who downloads from GitHub gets the next release when it's released. Specifically, for stuff like this (errors in repo, etc).

I'll update tonight when I get it sorted out. This is a fresh install right?

@daronspence daronspence reopened this Mar 20, 2015
@daronspence
Copy link
Owner

So that issue was specifically with some newer PHP features I inadvertently used. Apparently empty() only supports the checking of variables and I was attempting to check a function.

This has now been fixed. You can download a new copy of the master branch and it "should" work.

On another note, I highly suggest upgrading your servers version of PHP. :)

Cheers

@FriendlyWP
Copy link
Author

Thank you! I can activate now. I didn't realize my PHP was so out of date - I'm running 5.4.19. I'll upgrade when I can but I know many of my clients are also on 5.4x so it's good this is fixed - again, thanks!!!

I am running into a conflict with another function I'm running but it's not at all crucial. I'll open a separate ticket for that. Beta testers are a bit of a PITA right? :)

Thanks again for your very quick responses!!

@daronspence
Copy link
Owner

No beta testers are awesome! Thanks a lot :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants