bobbingwide / genesis-SB

Genesis-SB - Specially Built for seriously bonkers.com / bigram.co.uk
https://seriouslybonkers.com
GNU General Public License v2.0
0 stars 0 forks source link

genesis footer creds text deprecated #18

Closed bobbingwide closed 2 years ago

bobbingwide commented 5 years ago

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

bobbingwide commented 5 years ago

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

bobbingwide commented 5 years ago

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 commented 5 years ago

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

bobbingwide commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago
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 commented 4 years ago
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 commented 4 years ago

Herb,

Thank you for your response to my question. I am a novice at theme changes. Yes, I made the change under theme editor in the function.php. Where else would I go? I need some specific direction to find the correct location to make the change. I don’t understand what you mean by: changing the file out of WordPress.

Thanks so much for your time,

Ginger

On May 28, 2020, at 2:26 AM, Herb Miller notifications@github.com wrote:

https://user-images.githubusercontent.com/65608948/82339091-a8507280-99bb-11ea-8855-cb83367065b7.png 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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bobbingwide/genesis-SB/issues/18#issuecomment-635133289, or unsubscribe https://github.com/notifications/unsubscribe-auth/APURZ5GRDG5CQEWM5HMEIB3RTX7YRANCNFSM4ITVDFZA.

bobbingwide commented 4 years ago

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 commented 4 years ago

Herb,

The footer is in the Customizer, reading as it should. What I am trying to delete is the depreciation notice that also shows in the footer, but is not in the Customizer location.

I guess I need some professional help.

thank you.

On May 29, 2020, at 3:07 AM, Herb Miller notifications@github.com wrote:

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.

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bobbingwide/genesis-SB/issues/18#issuecomment-635801265, or unsubscribe https://github.com/notifications/unsubscribe-auth/APURZ5FI55NCWR6KXQY4YEDRT5NJVANCNFSM4ITVDFZA.

bobbingwide commented 4 years ago

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 commented 4 years ago

Herb, I took out the line, but still got the error message. See Screenshot. I don't know what you mean by “comment out” Showcase Pro by Design by Bloom. I contacted them but they aren’t servicing the theme, its discontinued by them. I purchased it from StudioPress one year ago. Thank so much for helping.

Ginger earthhorsehealing.com

bobbingwide commented 4 years ago

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 commented 4 years ago

Yes, and the message remains in the footer.

On May 30, 2020, at 10:57 AM, Krantz Ginger ginger.ehp@comcast.net wrote:

Herb, I took out the line, but still got the error message. See Screenshot. I don't know what you mean by “comment out” Showcase Pro by Design by Bloom. I contacted them but they aren’t servicing the theme, its discontinued by them. I purchased it from StudioPress one year ago. Thank so much for helping.

<Screen Shot 2020-05-30 at 10.47.21 AM.png>

Ginger earthhorsehealing.com http://earthhorsehealing.com/

On May 30, 2020, at 4:25 AM, Herb Miller <notifications@github.com mailto:notifications@github.com> wrote:

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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bobbingwide/genesis-SB/issues/18#issuecomment-636298494, or unsubscribe https://github.com/notifications/unsubscribe-auth/APURZ5GF2P366UDOTY65PXLRUC7HPANCNFSM4ITVDFZA.

cre8tivediva commented 4 years ago

@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 commented 4 years ago

Yes, the info is under genesis-themes-footer. See screenshot:

But the message still appears in my footer that it has been deprecated. It is the Deprecated message that I need to delete…. somehow?

On May 30, 2020, at 3:56 PM, cre8tivediva notifications@github.com wrote:

@GingerK674 https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bobbingwide/genesis-SB/issues/18#issuecomment-636376579, or unsubscribe https://github.com/notifications/unsubscribe-auth/APURZ5HNTRJNW3N47DUNN33RUFQFXANCNFSM4ITVDFZA.

cre8tivediva commented 4 years ago

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

cre8tivediva commented 4 years ago

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

bobbingwide commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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

flowerpeople commented 2 years ago

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 commented 2 years ago

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

bobbingwide commented 2 years ago

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

Closing issue as requested.