Site logo

Archived topic

Weird thing with Child Theme

5 replies · Started by Gary on April 26, 2020

Viewing posts 1–6 of 6

Hi Guys

I had a weird WordFence alert today telling me my child theme needed an update from version 1.0 to version 1.0.5. I logged in to WordPress and I could see the update.

I created this child theme and I know that there is no update to it, so to get round the issue I simply renamed the child theme to version 1.0.5 and the update went away. But my question is do you have any idea why this would happen?

I have done a WordFence scan and nothing malicious was found but I am guessing that this update must be malicious in some way, i.e. making me somehow install something malicious. I know this is just a guess so if you could shed any light on it I would appreciate it.

For the record this child theme only contains CSS rules and two very simply functions.

Cheers

Gary

Hi Leo

I have got to the bottom of this using a local version of the site.

There is a theme in the Wordpress repository called something very similar, it is called Foresight. Now my theme is called something a little different but the first word is Foresight. For some reason Wordpress thinks they are the same theme.

When I click to get more information about the update I see a completely different theme, so it looks like I did the right thing just changing my version number, weird!

Anyway I have just had a look at your child theme and it includes some things in the functions.php file that I have never added to any GeneratePress I have created and they have always worked, namely:

function generatepress_child_enqueue_scripts() {
if ( is_rtl() ) {
wp_enqueue_style( 'generatepress-rtl', trailingslashit( get_template_directory_uri() ) . 'rtl.css' );
}
}
add_action( 'wp_enqueue_scripts', 'generatepress_child_enqueue_scripts', 100 );

Can I ask does it matter that I have not added these functions? It has never been an issue in the past.

Cheers

Gary

Yup you don't need that snippet if your site isn't a RTL.

Thanks Leo that's great!

No problem :)

This archived topic is closed to new replies.