';
if ( 'publish' !== $post->post_status ) {
printf( '
%s
', esc_html__( 'Once this is published you can send its visitors somewhere else from here.', 'codebold-redirects' ) );
} else {
printf(
'',
checked( null !== $own && $own->enabled, true, false ),
esc_html__( 'Send visitors somewhere else', 'codebold-redirects' )
);
printf( '
', null !== $own && $own->enabled ? '' : ' hidden' );
// A plain text field, which postbox.js turns into the same page picker as the
// Redirects screen. The hidden fields carry a picked page's id, so the redirect
// follows that page if it is renamed — and without scripts it still works typed.
printf(
'',
esc_html__( 'Send them to', 'codebold-redirects' ),
esc_attr( null !== $own ? self::display_target( $own ) : '' ),
esc_attr__( 'Search pages or paste an address', 'codebold-redirects' ),
esc_attr( null !== $own ? $own->target_type : 'url' ),
esc_attr( null !== $own ? $own->target_label() : '' ),
absint( null !== $own ? $own->target_id : 0 )
);
printf( '
', esc_html__( 'Type of redirect', 'codebold-redirects' ) );
echo '
';
printf( '
%s
', esc_html__( 'Visitors and search engines will go there instead of seeing this page. You can keep editing it in the meantime.', 'codebold-redirects' ) );
echo '
';
}
// Redrawn by postbox.js after each save in the block editor, which saves without
// reloading the page — renaming a page there adds an old address to this list.
printf( '