ฉันจะรันโค้ด PHP โดยไม่ต้องเขียนโมดูลได้อย่างไร
ฉันต้องการแนบฟิลด์กับบันเดิลบางตัว ตัวอย่าง PHP จะทำงานให้ฉันดังนั้นฉันจึงไม่จำเป็นต้องมีโมดูลข้อมูลโค้ดด้านล่างคือสิ่งที่ต้องดำเนินการ: $field_name = 'field_custom_image'; // Create the field. $field = array( 'field_name' => $field_name, 'type' => 'image', ); field_create_field($field); จากนั้น snippet เพื่อเพิ่มฟิลด์นี้ลงในบันเดิล: // Create the instance. $instance = array( 'field_name' => $field_name, 'entity_type' => 'node', 'bundle' => 'article', 'label' => 'Image', 'description' => 'An image for the …