for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BulkWP\BulkDelete\Core\Base\Mixin;
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
/**
* Container of all Render methods.
*
* Ideally this should be a Trait. Since Bulk Delete still supports PHP 5.3, this is implemented as a class.
* Once the minimum requirement is increased to PHP 5.3, this will be changed into a Trait.
* @since 6.0.0
*/
abstract class Renderer extends Fetcher {
* Render Post Types as radio buttons.
protected function render_post_type_as_radios() {
$field_slug = $this->field_slug;
$post_types = bd_get_post_type_objects();
?>
<?php foreach ( $post_types as $post_type ) : ?>
<tr>
<td scope="row">
<input type="radio" name="<?php echo esc_attr( $field_slug ); ?>_post_type"
value="<?php echo esc_attr( $post_type->name ); ?>"
id="smbd_post_type_<?php echo esc_html( $post_type->name ); ?>">
<label for="smbd_post_type_<?php echo esc_html( $post_type->name ); ?>">
<?php echo esc_html( $post_type->label ); ?>
</label>
</td>
</tr>
<?php endforeach; ?>
}