最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

wp list table - `bulk_edit_custom_box` mess the input fields

matteradmin8PV0评论

I'm trying to create a bulk-edit plugin. Here is how Wordpress builk edit form looks by default:

Than I add the following code:

add_action( 'bulk_edit_custom_box', 'my_bulk_edit_custom_box', 10, 2 );
function my_bulk_edit_custom_box( $column_name, $post_type ) {  
    ?>
    <fieldset class="inline-edit-col-right">
        <label class="inline-edit-<?php echo $column_name; ?>">
            <span class="title">Custom</span>
            <select class="<?php echo $column_name; ?>" name="<?php echo $column_name; ?>">
                <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
            </select>
        </label>
    </fieldset>
    <?php
}

And the mystery is that form now looks like that:

The question is why field "Tags" jumps down? And is there is a way prevent tags input box from moving anywhere?

Post a comment

comment list (0)

  1. No comments so far