2
将自定义选项添加到wplink对话框
我设法为图像添加了一个自定义选项 function attachment_field_credit( $form_fields, $post ) { $field_value = get_post_meta( $post->ID, 'first_image', true ); $isSelected1 = $field_value == '1' ? 'selected ' : ''; $isSelected2 = $field_value != '1' ? 'selected ' : ''; $form_fields['first_image'] = array( 'label' => __( 'Use as first image' ), 'input' => 'html', 'html' => …