Slow section of code?
-
Can you give me a little insight into what is going on in this section of code?
if(count(get_plugins())>0){ foreach (get_plugins() as $key => $value) { $plugin = get_plugin_data(WP_PLUGIN_DIR.'/'.$key); if(!empty($plugin['AMP'])){//$plugin['AMP'] $imageUrl = ''; if(file_exists(AMPFORWP_MAIN_PLUGIN_DIR.$value['TextDomain'].'/screenshot.png')){ $imageUrl = plugins_url($value['TextDomain'].'/screenshot.png'); } $themeDesign[] = array( 'demo_link' => $plugin['AMP Demo'], 'upgreade'=>true, 'title'=>$plugin['AMP'], 'value'=>$value['TextDomain'], 'alt'=>$plugin['AMP'], 'img'=>$imageUrl, ); } }I’m a server admin so I can only make some sense of it, but I do know it is causing a serious slow down in the loading of articles if they have to be created outside of cache.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Slow section of code?’ is closed to new replies.