Skip to content

Instantly share code, notes, and snippets.

@UserMetaPro
UserMetaPro / generateWpmlConfig
Created October 2, 2014 21:49
Generate Wpml Config
function generateWpmlConfig() {
global $userMeta;
if ( ! $userMeta->isAdmin() ) return;
if ( ! is_writable( $userMeta->pluginPath ) ) return;
$writer = new XMLWriter();
$writer->openURI( $userMeta->pluginPath . '/wpml-config.xml');
$writer->setIndent(4);

Forms and Fields

  1. Action Hook: user_meta_before_form (since 1.1.3)
    Runs when generating form. Calling just before <form> tag.
    Parameter: (string) $formName

  2. Action Hook: user_meta_after_form (since 1.1.3)
    Runs when generating form. Calling just after <form> tag.
    Parameter: (string) $formName