As per the title:
Condition: If the theme doesn't exist then themes_api is called (which doesn't exist). Not sure what function this was referring to? Can't find it in the latest Wordpress source anywhere.
//theme isn't installed, use the WP.org API to grab the name rather than risk losing data on upgrade
$api = themes_api( 'theme_information', array( 'slug' => $stylesheet, 'fields' => array( 'sections' => false, 'tags' => false ) ) );
Tracking: Originally raised by a user on the Wordpress forums with 3.3.1 (though checked latest source 3.4.2 as well).
@Beaver6813 I can't find anything related to this in any of the previous tagged releases on the WordPress SVN either. There is an filter hook called themes_api so I'm thinking this is what was meant to be used and this is just some erroneous code? I'll look at this more tonight after work.
themes_api is defined in wp-admin/includes/theme.php since 2.8.
Ahh, I was looking in the main wp-includes folder, probably why I couldn't find it! Are we sure that this function is definitely only used while they're in the admin panel? As that might explain the issue.
Asked the finder for clarification on where they see the issue.
Yeah, looks like the get_name function is being called on the homepage for some reason. Will have a look later (unless one of you guys beats be to it!) as to why.
well .. now I deactivate the plugin and the website works but if I try to activate it .. the website doesnt work at all .. and you go on the website you can only read this:
Warning: Invalid argument supplied for foreach() in /web/htdocs/www.steyoyoke.com/home/wp-content/plugins/infinite-scroll/includes/presets.php on line 591
Fatal error: Call to undefined function themes_api() in /web/htdocs/www.steyoyoke.com/home/wp-content/plugins/infinite-scroll/includes/presets.php on line 598
Issue #281 Included files needed for `themes_api` call and added util…
…ity methods to handle now deprecated `get_theme(s)` calls
Hmm.. with the fix for this, do we really need to be including presets.php at all if we're not already in the admin panel?
@Beaver6813 It would take a large refactoring, and that is not something I want to engage in at this point.