In the Edit Post page how do I modify with jQuery the status select list?

Here is my JS:

jQuery('#post_status option[value="draft"]').text('Approve');

I simply trying to modify the text inside the option element in the status select form element in the Edit Post page.

For some reason it does not work. I am using ‘admin_footer’ action to add the JS.

Maybe there is another way?

I also tried this:

jQuery('#post_status option[value="changes-required"]').prop('selected', true);

Read more here: In the Edit Post page how do I modify with jQuery the status select list?

Leave a Reply

Your email address will not be published. Required fields are marked *