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

genesis footer creds text deprecated #18

Closed
bobbingwide opened this issue Sep 4, 2019 · 25 comments
Closed

genesis footer creds text deprecated #18

bobbingwide opened this issue Sep 4, 2019 · 25 comments

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Sep 4, 2019

Noticed at the bottom of the page. deprecated messages. i took a screen capture

@bobbingwide
Copy link
Owner Author

6CF19AB5-707D-4E32-B862-32F5558B3B5C

@bobbingwide bobbingwide changed the title genesis footer creds deprecated genesis footer creds text deprecated Sep 4, 2019
@bobbingwide
Copy link
Owner Author

bobbingwide commented Sep 5, 2019

Notice: genesis_footer_creds_text is deprecated since version 3.1.0! Use genesis_pre_get_option_footer_text instead. This filter is no longer supported. You can now modify your footer text using the Theme Settings. in /home/rcorguk/public_html/wp-includes/functions.php on line 4711

@bobbingwide
Copy link
Owner Author

When WP_DEBUG is set to false then it's OK.
image

@bobbingwide
Copy link
Owner Author

bobbingwide commented Sep 29, 2019

The fix, as suggested, is to change:

add_filter( 'genesis_footer_creds_text', "genesis_sb_footer_creds_text" );

to

add_filter( 'genesis_pre_get_option_footer_text', "genesis_sb_footer_creds_text" );

This change should be applied to other themes that use the genesis_footer_creds_text filter. Alternatively, unless there's some additional code that implements a side effect OR that actually looks at what's being filtered, the filter logic can be removed.

One side effect is this logic:

do_action( "oik_add_shortcodes" );

The purpose of the logic is to enable oik shortcodes if they haven't already been enabled.
The question we have to ask ourselves is, does/could genesis_pre_get_option_footer_text get called more than once and if so, would invoking this action multiple times be a problem.
Or should we just test if the action has already been performed?

The other themes that need changing are:

Theme side effect Change / drop
genesis-a2z Yes Change
genesis-hm Yes Change
genesis-oik Yes Change
genesis-paap No Change
genesis-tags Yes Change
genesis-rngs Yes Change
genesis-srab Yes Change
hampshire-eft No Change

@bobbingwide
Copy link
Owner Author

bobbingwide commented Sep 29, 2019

For oik-plugins.com, the filter function was being hooked into twice. Once by the genesis-oik theme and again by the oik-thugin plugin, which acts as a grandchild theme.
I found it was necessary to change both filter functions. I couldn't rely on the option having been saved by the customiser. So, when I removed the filter function from the theme then I only saw the output from the oik-thugin plugin.

@GingerK674
Copy link

GingerK674 commented May 19, 2020

PHP WITH CHANGES

I have the same issue. i made the changes you recommended under function.php (photo with changes). They are not accepted and this is the message that comes up. Can you help me resolve this? Thank you.

@bobbingwide
Copy link
Owner Author

PHP WITH CHANGES

I have the same issue. i made the changes you recommended under function.php (photo with changes). They are not accepted and this is the message that comes up. Can you help me resolve this? Thank you.

I believe your problem is that you are attempting to edit the code in the Theme editor and are getting Scrape nonce check failed. Please try again.

Have you tried changing the file outside of WordPress

@GingerK674
Copy link

GingerK674 commented May 28, 2020 via email

@bobbingwide
Copy link
Owner Author

bobbingwide commented May 29, 2020

WordPress source code is developed on a variety of devices: PC’s running Windows, Apple Macs, and tablets. I’m responding using my iPad.
When I write code I make the changes using a text editor such as Notepad++, or in an Integrated Development Environment such as PhpStorm. When everything works I then have to get the changes to the source file from my local machine to the systems on which it’s going to run. Obviously I use Git and GitHub for version control but that’s not how I deploy the code. Normally I create a full .zip file for a plugin or theme.

When you’re only changing one file then you can use FTP ( File Transfer Protocol ). Or you could use the Editor provided by your hosting company.

@GingerK674 BUT, if all you’re doing is changing the footer credits then why not use the Customizer?

@GingerK674
Copy link

GingerK674 commented May 29, 2020 via email

@bobbingwide
Copy link
Owner Author

OK, to fix that problem you do need to change the functons.php file
Comment out or remove the line of code that you were going to change.
Line 526 in your screen capture.
What's your child theme name?

@GingerK674
Copy link

GingerK674 commented May 30, 2020 via email

@bobbingwide
Copy link
Owner Author

bobbingwide commented May 30, 2020

I took out the line, but still got the error message. See Screenshot.

Hi Ginger, do you mean you still got the 'Scrape nonce check failed' message?

If so, there are a number of reports by other people saying that it could be an issue due to a plugin.
e.g. Siteground Optimizer, Shortpixel Image Optimization.
Deactivating your plugins before you edit the theme file may help.
Other people have suggested installing a plugin called Theme Editor.
https://wordpress.org/plugins/theme-editor/

This seems to be a huge sledgehammer for such a small nut. But it may work.

I don't know what you mean by “comment out”
To comment out code means to wrap it in a special sequence of characters so that it's not considered to be code. In PHP there is the double slash comment ( // ) that can be used to say the code's on the left and anything after the double slash on this line is a comment.
Or there are block comments starting with /* and ending with */

This information won't help you if you are still trying to use the built in Theme Editor.

I guess I need some professional help.

I am a professional. Would you like me to fix the problem?

Do you still have the original theme .zip file. If so, send it to me, then I can change it, send it back to you and you can update it by re-installing it.

@GingerK674
Copy link

GingerK674 commented May 30, 2020 via email

@cre8tivediva
Copy link

@GingerK674 Genesis added a Footer box under Genesis > Theme Settings > Footer. You no longer need to use the function file to modify the footer credits.

@GingerK674
Copy link

GingerK674 commented May 30, 2020 via email

@cre8tivediva
Copy link

@GingerK674 did you remove your code from the functions.php file? Sometimes it may appear that it wasn't saved but it is.

@cre8tivediva
Copy link

@GingerK674 can you give a screenshot of what's Footer box under the customizer settings?

@bobbingwide
Copy link
Owner Author

@cre8tivediva @GingerK674 's problem is she can't edit the theme's functions.php file. I'm assuming she can't edit wp-config.php either. The easiest solution would be to deliver and updated version of her theme that no longer contains the hook for the filter function.

@GingerK674
Copy link

GingerK674 commented May 30, 2020

I don't have either the Siteground Optimizer, Shortpixel Image Optimization plug-ins listed that could cause the problem. I have the original file, from StudioPress. There were some code changes made, will I loose them?

HM: Deleted attached file

@bobbingwide
Copy link
Owner Author

@GingerK674 Thanks for telling me that the theme's files have been changed.

The original functions.php file in the showcase-pro theme didn't use the filter that's been deprecated. So this must have been added at some time.
I imagine you don't have a record of all the changes that have been made. So don't re-install the original theme until you have a full backup.

I suggest you try installing the theme-editor plugin I mentioned earlier and see if you are able to modify the functions.php file, as originally planned, using that tool.
If not, then at least you may be able to use the Download File or Download Theme buttons to get the backup of the currently installed theme.

image

@GingerK674
Copy link

Thank you. I'll try the WP theme editor plug-in and let you now how it goes.

@flowerpeople
Copy link

Hi @GingerK674
I am not sure if you had already fixed the problem. I come across the same issue and I fixed it by this way:

Go to Genesis > Theme Setting
螢幕截圖 2022-03-16 下午1 29 08

螢幕截圖 2022-03-16 下午1 26 53

Theme Setting > Footer
螢幕截圖 2022-03-16 下午1 27 03

Check if the deprecated message appear in this box. I think when Genesis was updating to the newer version, it just copy the message from functions.php into this footer box.

螢幕截圖 2022-03-16 下午1 28 44

Your problem should be fixed by just removing all the things inside this box and then Publish.

@GingerK674
Copy link

Thank you. the issue is resolved. Is there somewhere I can to indicate that it is complete?

@bobbingwide
Copy link
Owner Author

Is there somewhere I can to indicate that it is complete?

Closing issue as requested.

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

No branches or pull requests

4 participants