/**
  * process bulk actions for module/plugin
  * @param array $plugins
  * @param $action action bulk
  */
 public function process_bulk_action($plugins = array(), $action = '')
 {
     // Grab plugin data from $_POST.
     #$plugins             = isset( $_POST['plugin'] ) ? (array) $_POST['plugin'] : array();
     $plugins_to_activate = array();
     // Split plugin value into array with plugin file path, plugin source and plugin name.
     $plugins_need2activate = array();
     if (is_array($plugins)) {
         foreach ($plugins as $i => $plugin) {
             $_plugin = explode(',', $plugin);
             if (isset(HW_TGM_Module_Activation::get_instance()->plugins[$_plugin[0]])) {
                 $module_info = HW_TGM_Module_Activation::get_instance()->plugins[$_plugin[0]];
                 $active = array();
                 //local downloaded plugins
                 if (!empty($module_info['require_wp_plugin']) && file_exists(WP_PLUGIN_DIR . '/' . trim($module_info['require_wp_plugin'], '/'))) {
                     $active[] = $module_info['require_wp_plugin'];
                     $active[] = 'repo';
                     $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . trim($module_info['require_wp_plugin'], '/'));
                     $active[] = $plugin_data['Name'];
                 }
                 if (!empty($module_info['require_module'])) {
                     //check module that require an other
                     $require_module = $module_info['require_module'];
                     if (!hw_is_active_module($require_module)) {
                         hw_inline_msg("Xin lỗi, module `{$module_info['name']}` yêu cầu cài trước module " . $require_module);
                         $plugins_to_activate[] = array($module_info['slug'], $module_info['name']);
                     }
                 }
                 if (!empty($module_info['require_wp_plugin']) && !is_plugin_active($module_info['require_wp_plugin']) && !empty($active)) {
                     $plugins_need2activate[] = $active;
                 }
             }
             $plugins_to_activate[] = $_plugin;
         }
     }
     foreach ($plugins_to_activate as $i => $array) {
         if (isset($array[1]) && !preg_match('|.php$|', $array[1])) {
             unset($plugins_to_activate[$i]);
         }
     }
     // Return early if there are no plugins to activate.
     if (empty($plugins_to_activate)) {
         return;
     }
     //activate plugins require for the your modules
     if (count($plugins_need2activate)) {
         $this->hw_activate_plugins($plugins_need2activate);
     }
     if ('tgmpa-bulk-activate' === $action) {
         // Now we are good to go - let's start activating plugins.
         hw_activate_modules($plugins_to_activate);
     } elseif ('tgmpa-bulk-deactivate' === $action) {
         //deactive module
         hw_deactivate_modules($plugins_to_activate);
     }
     // Update recently activated plugins option.
     $recent = (array) get_option('recently_activated');
     foreach ($plugins as $plugin => $time) {
         if (isset($recent[$plugin])) {
             unset($recent[$plugin]);
         }
     }
     update_option('recently_activated', $recent);
 }
            /**
             * skin preview
             */
            if (!$init_skin_preview) {
                echo '<td rowspan="' . count($allow_pts) . '">' . $skin_preview_holder . '</td>';
                $init_skin_preview = true;
            }
            echo '</tr>';
        }
    }
    ?>
</table>
Để cài đặt riêng rẽ template nhấn <a target="_blank" href="<?php 
    echo esc_url(admin_url('options-general.php?page=hw_settings#section-my_posttype_settings__0'));
    ?>
">vào đây</a> và chọn tab "Post Type".

<p><strong>Chú ý</strong>:
    <ul>
        <li>- Tạo các files skin chứa trong plugin này + trong thư mục <code>wp-content/hw_relatedposts_skins</code> + và <code>{THEME_FOLDER}/hw_relatedposts_skins</code></li>
        <li>Skin file có thể là 1 file độc lập không nằm trong thư mục, copy các files template từ module <em>hw-yarpp/../yarpp-templates</em> vào <em>{THEME_FOLDER}/hw_relatedposts_skins</em></li>
        <li>- Sử dụng thêm skins lấy từ plugin <em>hw-taxonomy-post-list</em> loại trừ <code>wp-content/wcp_hw_skins</code> và <code>{THEME_FOLDER}/wcp_hw_skins</code></li>
        <li>- Việc thiết lập widget skin tại widget "Truy xuất nội dung theo chuyên mục" không có tác dụng.
            Mà lựa chọn ở cột "<strong>Giao diện box widget</strong>" để thay đổi skin cho sidebar (box) đó.</li>
        <li>- Trong trường hợp sử dụng <strong>Giao diện từ HWTPL</strong> sẽ kế thừa cài đặt tùy chỉnh widget nếu bạn hiển thị với sidebar đó. VD: Sửa before_title, Sửa after_title, Sửa before_widget... DO vậy: cần đặt widget vào đúng sidebar bạn muốn dùng để thiết tùy chỉnh sidebar cho chính xác trước khi lưu cấu hình.</li>
    </ul>
</p>
<?php 
} else {
    hw_inline_msg('Module HW SKIN chưa kích hoạt.');
}