- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
1.0 KiB
PHP
Executable File
39 lines
1.0 KiB
PHP
Executable File
<?php
|
|
|
|
class bwfan_Input_Order_State_Select {
|
|
public function __construct() {
|
|
// vars
|
|
$this->type = 'Order_State_Select';
|
|
|
|
$this->defaults = array(
|
|
'multiple' => 0,
|
|
'allow_null' => 0,
|
|
'choices' => array(),
|
|
'default_value' => array(),
|
|
'class' => '',
|
|
);
|
|
}
|
|
|
|
public function render( $field, $value = null ) {
|
|
|
|
$field = array_merge( $this->defaults, $field );
|
|
if ( ! isset( $field['id'] ) ) {
|
|
$field['id'] = sanitize_title( $field['id'] );
|
|
}
|
|
$chosen_states = $value;
|
|
|
|
?>
|
|
|
|
<select id="<?php echo esc_attr( $field['id'] ); ?>" name="<?php echo $field['name']; //phpcs:ignore WordPress.Security.EscapeOutput ?>[states][]" class="chosen_select <?php echo esc_attr( $field['class'] ); ?>" multiple="multiple" data-placeholder="<?php echo( isset( $field['placeholder'] ) ? esc_attr( sanitize_text_field( $field['placeholder'] ) ) : esc_html__( 'Search...', 'wp-marketing-automations' ) ); ?>">
|
|
<?php
|
|
WC()->countries->country_dropdown_options( '', $chosen_states );
|
|
?>
|
|
</select>
|
|
|
|
<?php
|
|
}
|
|
|
|
}
|
|
|
|
?>
|