sukiwp / suki

A flexible and lightweight WordPress theme for blogs, WooCommerce, and other purposes
https://sukiwp.com/
GNU General Public License v2.0
73 stars 12 forks source link

Important > function suki_entry_meta() is NOT plugable #111

Closed AlchemyUnited closed 3 years ago

AlchemyUnited commented 3 years ago

The function suki_entry_meta() in this file

https://github.com/sukiwp/suki/blob/master/inc/template-tags.php

is not plugable because it's wrapped by this conditional:

if ( ! function_exists( 'suki_entry_header_meta' ) ) :

I'd call this a significant bug because plugging suki_entry_header_meta() means that suki_entry_meta() will also go MIA.

Mind you, I get it, you'd think someone would have plugged suki_entry_header_meta() at some point but I guess not :)

AlchemyUnited commented 3 years ago

FYI - The work around is to make a copy function suki_entry_header_meta() and put it with your other plugged (Suki) functions. That'll force Suki's function suki_entry_meta() to go MIA and then you're plugged version won't cause an error (for trying to have two functions both named function suki_entry_meta() because Suki's conditional that wraps function suki_entry_meta() doesn't see your plugged version.

daviedR commented 3 years ago

Hi @AlchemyUnited

We have a wrong function_exists check on that. It should have been:

if ( ! function_exists( 'suki_entry_meta' ) ) :

By the way it has been fixed on the latest development branch.

Thanks!