<?php

use_javascript(url_for('wpPersistenceManager/js', 'absolute=true'));

function multiple_action_checkbox_line($type, $object_id) {
    return checkbox_tag($type . '[]', $object_id, wpPersistenceManager::isItemSelected($type, $object_id), array('id' => $type . '_' . $object_id, 'class' => 'checkbox-' . $type, 'onclick' => 'updateSelection(this.checked, "' . $type . '", ' . $object_id . ', "' . $type . '-count", false);'));
}

function multiple_action_checkbox_all($type) {
    return checkbox_tag($type . '_all', 1, false, array('id' => $type . '_all', 'onclick' => 'checkAll(this.checked, "' . $type . '");'));
}

function multiple_action_info_selected($type) {
    return '<span class="' . $type . '-count">' . wpPersistenceManager::getSelectedItemCount($type) . '</span>';
}