Entschuldigung, wenn ich in meiner Frage einige der falschen Begriffe verwende. Ich bin Autodidakt und lerne noch. Der folgende Code ist Teil einer Formularvorlage. Ich möchte dem Array einige zusätzliche Attribute hinzufügen.
Ich frage mich, wie ich das tun kann, ohne die vorhandenen Attribute der Vorlage zu löschen.
Ich möchte die zusätzlichen Attribute in der Datei functions.php meines Child-Themes beibehalten.
Hier ist die zugehörige Plugin-Funktion, die ich ändern möchte:
/**
* Output product title
*
* @since 1.0.0
*
* @param int $post_id post_id for this meta if any
*/
public static function title( $post_id, $product_title ) {
WCVendors_Pro_Form_Helper::input(
apply_filters(
'wcv_product_title',
array(
'post_id' => $post_id,
'id' => 'post_title',
'label' => __( 'Product name', 'wcvendors-pro' ),
'value' => $product_title,
'custom_attributes' => array(
'required' => '',
'data-parsley-maxlength' => '100',
'data-parsley-error-message' => __( 'Product name is required or too long.', 'wcvendors-pro' ),
),
)
)
);
}
Hier ist, was ich hinzufügen möchte:
'placeholder' => __( 'Here is some placeholder text', 'wcvendors-pro' ),
'desc_tip' => 'true',
'description' => __( 'Here is some description text.', 'wcvendors-pro' ),