添付ファイルウィンドウにURLフィールドを追加するにはどうすればよいですか?
例えば... add_action('init', 'reg_tax'); function reg_tax() { register_taxonomy_for_object_type('category', 'attachment'); } 「カテゴリ」入力フィールドをメディアマネージャーと添付ファイルエディターに追加します。代わりにこの機能を変更して「リンク先」URLをキャプチャできるかどうかを知りたいのですが。画像がクリックされると、URLが実行されます。 また、この新しいフィールドの値を取得する方法を知る必要があります。 更新:以下のトーマスアンサーのおかげで、ここに私の最終的な解決策があります... function my_image_attachment_fields_to_edit($form_fields, $post) { $form_fields["custom1"] = array( "label" => __("Image Links To"), "input" => "text", "value" => get_post_meta($post->ID, "_custom1", true) ); return $form_fields; } function my_image_attachment_fields_to_save($post, $attachment) { if( isset($attachment['custom1']) ){ update_post_meta($post['ID'], '_custom1', $attachment['custom1']); } return $post; } …