Same theme name issue with wordpress repository theme

I created new theme with name for example XYZ. its good till now but the issue comes before few days.
Wordpress repository has a theme with same name as my theme’s name. Now the issue is when the updates comes for wordpress theme, the update notification is display for my themes also. So what can i do for this ?

Thanks,
Aezaz

Related posts

1 comment

  1. WP checks for updates by sending data about all plugins and themes to the repository. To prevent false update messages for your own code you need to selectively scrub it out of those requests.

    The example for theme by Mark Jaquith:

    function cws_hidden_theme_12345( $r, $url ) {
        if ( 0 !== strpos( $url, 'http://api.wordpress.org/themes/update-check' ) )
            return $r; // Not a theme update request. Bail immediately.
        $themes = unserialize( $r['body']['themes'] );
        unset( $themes[ get_option( 'template' ) ] );
        unset( $themes[ get_option( 'stylesheet' ) ] );
        $r['body']['themes'] = serialize( $themes );
        return $r;
    }
    
    add_filter( 'http_request_args', 'cws_hidden_theme_12345', 5, 2 );
    

    See excluding your plugin or theme from update checks for full post with details.

Comments are closed.