Changeset 3203895
- Timestamp:
- 12/07/2024 12:29:47 AM (15 months ago)
- File:
-
- 1 edited
-
wp-settings/trunk/wp-settings.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-settings/trunk/wp-settings.php
r3203857 r3203895 4 4 Plugin URI: https://wordpress.org/plugins/wp-settings/ 5 5 Description:Displays the important information about WordPress installation such as important wordpress settings,database settings,theme details and php information.You can generate DB Backup Script for restoring the database and for keeping database backups. 6 Version: 2.5. 26 Version: 2.5.3 7 7 Author: CodeCompiled 8 8 Author URI: http://www.codecompiled.com … … 256 256 return $data; 257 257 } 258 259 function wpsettings__getPluginsDetails() 260 { 261 $pluginInfo = array(); 262 if (function_exists( 'get_plugins' ) ) { 263 /* 264 get plugins 265 */ 266 $name=''; 267 $desc=''; 268 $plugins=get_plugins(); 269 foreach ($plugins as $key=>$value) { 270 foreach ($value as $key1 => $value1) { 271 // var_dump($value1); 272 //echo $key1.'\n'; 273 274 //echo $key1." ---> key.\n"; 275 //echo $value1.".-->value.\n"; 276 if($key1=="Name") 277 { 278 $name=$value1; 279 } 280 if($key1=="Description") 281 { 282 $desc=$value1; 283 } 284 } 285 286 $pluginInfo[$name]= $desc; 287 288 } 289 290 } 291 else 292 { 293 $pluginInfo[$field]='INFORMATION NOT AVAILABLE'; 294 } 295 return $pluginInfo; 296 } 258 function wpsettings__getPluginsDetails() { 259 $pluginInfo = array(); 260 261 if (function_exists('get_plugins')) { 262 $plugins = get_plugins(); 263 264 foreach ($plugins as $pluginData) { 265 if (isset($pluginData['Name'])) { 266 $name = $pluginData['Name']; 267 268 // Store plugin information as an associative array for each plugin 269 $pluginInfo[] = array( 270 'Name' => $name, 271 'Description' => isset($pluginData['Description']) ? $pluginData['Description'] : '', 272 'Version' => isset($pluginData['Version']) ? $pluginData['Version'] : '', 273 'Author' => isset($pluginData['Author']) ? $pluginData['Author'] : '' 274 ); 275 } 276 } 277 } else { 278 // Return a single entry if plugin information is not available 279 $pluginInfo[] = array('Name' => 'INFORMATION NOT AVAILABLE', 'Description' => '', 'Version' => ''); 280 } 281 282 return $pluginInfo; 283 } 284 285 286 297 287 298 288 … … 689 679 <tr> 690 680 <th colspan="2"> 691 Plugin Details 681 Plugin Details <!--not used--> 692 682 </th> 683 </tr> 684 <tr> 685 <td> 686 Name 687 </td> 688 <td> 689 Description 690 </td> 693 691 </tr> 694 692 <?php foreach($plugindetails as $sqlKey=>$sqlValue) { ?> … … 876 874 877 875 <!-- Plugin Details --> 878 <table id="PluginDetails"> 876 <table id="PluginDetails"> 877 <tr> 878 <th colspan="4"> 879 Plugin Details 880 </th> 881 </tr> 882 <tr style="background-color: #e0e0e0; font-weight: bold;"> 883 <td style="width: 20%;">Name</td> 884 <td style="width: 40%;">Description</td> 885 <td style="width: 20%;">Author</td> 886 <td style="width: 20%;">Version</td> 887 </tr> 888 <?php 889 $plugindetails = wpsettings__getPluginsDetails(); 890 foreach ($plugindetails as $plugin) { 891 ?> 879 892 <tr> 880 <th colspan="2">Plugin Details</th> 893 <td><?php echo htmlspecialchars($plugin['Name']); ?></td> 894 <td><?php echo htmlspecialchars($plugin['Description']); ?></td> 895 <td><?php echo htmlspecialchars($plugin['Author']); ?></td> 896 <td><?php echo htmlspecialchars($plugin['Version']); ?></td> 897 881 898 </tr> 882 <?php 883 $plugindetails = wpsettings__getPluginsDetails(); 884 foreach ($plugindetails as $sqlKey => $sqlValue) { ?> 885 <tr> 886 <td style="width:30%"><?php echo $sqlKey; ?></td> 887 <td><?php echo $sqlValue; ?></td> 888 </tr> 889 <?php } ?> 890 </table> 899 <?php } ?> 900 </table> 901 891 902 <?php } ?> 892 903 </body>
Note: See TracChangeset
for help on using the changeset viewer.