• William

    (@william_oneb)


    Hi,

    Which function can I call programmatically to import the custom CTPs, Fields, etc?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Anonymous User 14808221

    (@anonymized-14808221)

    There is no such function.

    You might use a CSV import, as elaborated here.

    If this does not fit your need, can you elaborate on the exact goal?

    Thread Starter William

    (@william_oneb)

    OK then the function that imports “settings.xml” from exported zip file.

    • This reply was modified 9 years ago by William.
    Anonymous User 14808221

    (@anonymized-14808221)

    The function used to import the settings.xml file is (in Types) located in import_from_zip_file.php`:
    get_data_from_file

    I hope that helps.

    Thread Starter William

    (@william_oneb)

    Unfortunately get_data_from_file is a private function so I can’t call it in “functions.php” of a theme.
    Any ideas?

    Anonymous User 14808221

    (@anonymized-14808221)

    We have a public function to import xml files function wpcf_admin_import_data($data = '', $redirect = true, $context = 'types', $args = array() )

    But we may not want to make it public as it will probably also getting outdated in the near future.

    We have to rewrite the whole import process for the next major changes in the Many To Many Relationships.

    Unfortunately, there is not much else I can provide now.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Which function can I call programmatically to import custom CTPs/Fields?’ is closed to new replies.