'; //title bar echo '
'; echo '

' . __('Global View', 'perfmatters') . '

'; echo '

' . __('This is a visual representation of the Script Manager configuration across your entire site.', 'perfmatters') . '

'; echo '
'; $options = get_option('perfmatters_script_manager'); //global scripts display if(!empty($options)) { foreach($options as $category => $types) { //category header echo '

' . $category . '

'; if(!empty($types)) { $type_names = array( 'js' => 'JavaScript', 'css' => 'CSS', 'plugins' => 'Plugins' ); echo '
'; foreach($types as $type => $scripts) { echo '
'; echo '
'; echo '

' . $type_names[$type] . '

'; echo '
'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if(!empty($scripts)) { foreach($scripts as $script => $details) { if(!empty($details)) { foreach($details as $detail => $values) { $contains_junk = false; echo ''; echo ''; echo ''; echo ''; echo ''; } } } } echo ''; echo '
' . __('Handle', 'perfmatters') . '' . __('Setting', 'perfmatters') . '
' . $script . ''; echo '' . $detail . ''; if($detail == 'current' || $detail == 'post_types' || $detail == 'archives') { if(!empty($values)) { echo ' ('; $valueString = ''; foreach($values as $key => $value) { if($detail == 'current') { if((int)$value !== 0) { if($value == 'pmsm-404') { $valueString.= '404, '; } else { $permalink = get_permalink($value); if($permalink) { $valueString.= '' . $value . ', '; } else { $valueString.= '' . $value . ', '; $contains_junk = true; } } } else { $valueString.= 'homepage, '; } } else { $valueString.= $value . ', '; } } echo rtrim($valueString, ", "); echo ')'; } } elseif($detail !== 'everywhere') { echo ' (' . $values . ')'; } echo ''; //refresh button if($contains_junk) { echo ''; } //trash button echo ''; echo '
'; echo '
'; echo '
'; } echo '
'; } } } else { echo '
'; echo '

' . __("You don't have any scripts disabled yet.", 'perfmatters') . '

'; echo '
'; }