| @@ -113,16 +113,20 @@ | ||
| 113 | 113 | } |
| 114 | 114 | ?> |
| 115 | 115 | </div> |
| 116 | 116 | <?php |
| 117 | +$suffix = ''; | |
| 117 | 118 | if ( $section == 1 ) { |
| 118 | 119 | require 'menu_view_plugins.php'; |
| 120 | + $suffix = 'plugins'; | |
| 119 | 121 | |
| 120 | 122 | } elseif ( $section == 2 ) { |
| 121 | 123 | require 'menu_view_iostats.php'; |
| 124 | + $suffix = 'iostats'; | |
| 122 | 125 | |
| 123 | 126 | } elseif ( $section == 3 ) { |
| 124 | 127 | require 'menu_view_diskio.php'; |
| 128 | + $suffix = 'diskio'; | |
| 125 | 129 | |
| 126 | 130 | } elseif ( $section == 4 ) { |
| 127 | 131 | require 'menu_pro.php'; |
| 128 | 132 | |
| @@ -184,9 +188,9 @@ | ||
| 184 | 188 | <?php |
| 185 | 189 | } |
| 186 | 190 | if ( isset( $save_png ) ) { |
| 187 | 191 | ?> |
| 188 | - <a type="button" class="button button-secondary" id="download-png-img" download="<?php echo esc_attr( $profile_name) ?>_plugins.png" title="<?php esc_attr_e('Click to download as an image', 'code-profiler' )?>" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-download" style="vertical-align: sub;"></span><?php esc_attr_e('Download as a PNG image', 'code-profiler' )?></a> | |
| 192 | + <a type="button" class="button button-secondary" id="download-png-img" download="<?php echo esc_attr("{$profile_name}_{$suffix}") ?>.png" title="<?php esc_attr_e('Click to download as an image', 'code-profiler' )?>" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-download" style="vertical-align: sub;"></span><?php esc_attr_e('Download as a PNG image', 'code-profiler' )?></a> | |
| 189 | 193 | <?php |
| 190 | 194 | } |
| 191 | 195 | ?> |
| 192 | 196 | </div> |