Esempio n. 1
0
 function deactivate_extensions($extensions, $silent = false)
 {
     $current = get_option('socme_active_extensions', array());
     $do_blog = false;
     foreach ((array) $extensions as $extension) {
         $extension = plugin_basename($extension);
         if (!socmeExtensionLoader::is_extension_active($extension)) {
             continue;
         }
         if (!$silent) {
             do_action('socme_deactivate_extension', trim($extension));
         }
         // Deactivate for this blog only
         $key = array_search($extension, (array) $current);
         if (false !== $key) {
             $do_blog = true;
             array_splice($current, $key, 1);
         }
         //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output.
         if (!$silent) {
             do_action('socme_deactivate_' . trim($extension));
             do_action('socme_deactivated_extension', trim($extension));
         }
     }
     if ($do_blog) {
         update_option('socme_active_extensions', $current);
     }
 }
Esempio n. 2
0
			<th class="manage-column check-column" scope="col"><input type="checkbox" /></th>
			<th class="manage-column" scope="col"><?php 
_e('Extension', SOCME);
?>
</th>
			<th class="manage-column" scope="col"><?php 
_e('Description', SOCME);
?>
</th>
		</tr>
		</tfoot>
		<tbody class="plugins">
		<?php 
global $socmeExtensionLoader;
foreach ($socmeExtensionLoader->available_extensions as $ext) {
    $is_active = socmeExtensionLoader::is_extension_active($ext['ExtensionPath']);
    ?>
		<tr class="<?php 
    echo $is_active ? 'active' : 'inactive';
    ?>
">
			<th class="check-column" scope="row"><input type="checkbox" value="<?php 
    echo $ext['ExtensionPath'];
    ?>
" name="checked[]" /></th>
			<td class="plugin-title"><strong><?php 
    echo $ext['ExtensionName'];
    ?>
</strong></td>
			<td class="desc"><?php 
    echo wpautop($ext['Description']);