• Resolved Kelderro

    (@kelderro)


    In the configuration of Ultimate FAQ you are able to disable sharing with all social media option. This works as expected only the front-end doesn’t remove the “Share:” text when no social media option is enabled. In order to fix this I made a change in the file .\Shortcodes\DisplayFAQs.php line 18.

    Original:
    $Socialmedia = explode(",", $Socialmedia_String);

    Bugfix:
    $Socialmedia = strlen($Socialmedia_String) == 0 ? array() : explode(",", $Socialmedia_String);

    The explode function will always create an array with at least a single element. Therefore the check on line 125 will never be true.

    https://ww.wp.xz.cn/plugins/ultimate-faqs/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Kelderro,

    Thanks for pointing out that bug and sharing your fix, it’s very much appreciated.

    Hi Kelderro,
    Thank you for posting. I am new to this, Do I look for a directory-file called .\Shortcodes\DisplayFAQs.php on the server and make the change there?
    Is there a way to get to it through the Wp dashboard?

    Thanks in advance

    Thread Starter Kelderro

    (@kelderro)

    Hi ecaruth,

    Follow the following steps:
    – Goto your WP dashboard
    – Click on FAQs in the menu on the left
    – Click on FAQ Settings
    – Scroll down till you see “Social Media Option”
    – Validate if all “Social Media Option” are not selected

    If you now go to a FAQ you still see the “share:” text. In order to resolve this you need to make a change in a file on the server.

    – Connect to your server (Remote Desktop, FTP or what you prefer)
    – Goto the folder which contains your WP installation
    – Open the folder plugins
    – Open the folder ultimate-faqs
    – Open the folder Shortcodes
    – Open the file DisplayFAQs.php in your favorite edtor (Notepad++ or nano)
    – Goto line 18 and validate if the content of that line contains the code:
    $Socialmedia = explode(",", $Socialmedia_String);
    – Replace this line of code with:
    $Socialmedia = strlen($Socialmedia_String) == 0 ? array() : explode(",", $Socialmedia_String);
    – Save / upload the DisplayFAQs.php file
    – Refresh the FAQ
    – Validate if the ‘share’ text is not there anymore

    Plugin Author Rustaurius

    (@rustaurius)

    Hi guys,

    The version we released a couple of days ago should address this issue.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Bug] Share text always visible’ is closed to new replies.