feat: wire file transport services
This commit is contained in:
@@ -395,6 +395,32 @@ if ( ! function_exists( 'add_query_arg' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'wp_nonce_field' ) ) {
|
||||
/**
|
||||
* Minimal nonce field renderer for unit tests.
|
||||
*
|
||||
* @param string $action Nonce action.
|
||||
* @param string $name Field name.
|
||||
* @return void
|
||||
*/
|
||||
function wp_nonce_field( $action, $name ) {
|
||||
echo '<input type="hidden" name="' . esc_attr( $name ) . '" value="' . esc_attr( $action ) . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'submit_button' ) ) {
|
||||
/**
|
||||
* Minimal submit button renderer for unit tests.
|
||||
*
|
||||
* @param string $text Button text.
|
||||
* @param string $type Button type.
|
||||
* @return void
|
||||
*/
|
||||
function submit_button( $text, $type = 'primary' ) {
|
||||
echo '<button class="button button-' . esc_attr( $type ) . '" type="submit">' . esc_html( $text ) . '</button>';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'wp_die' ) ) {
|
||||
/**
|
||||
* Minimal WordPress die handler for unit tests.
|
||||
|
||||
Reference in New Issue
Block a user