Esempio n. 1
0
/**
 * Update strings when custom fields change.
 *
 * @param $fields
 */
function wpmtst_update_l10n_strings($fields)
{
    // WPML
    wpmtst_form_fields_wpml($fields);
    // Polylang
    wpmtst_form_fields_polylang($fields);
}
Esempio n. 2
0
/**
 * Polylang conditional loading
 *
 * @since 1.21.0
 */
function wpmtst_admin_polylang()
{
    if (!defined('POLYLANG_VERSION')) {
        return;
    }
    $plugin_version = get_option('wpmtst_plugin_version');
    wp_enqueue_style('wpmtst-admin-style-polylang', WPMTST_URL . 'css/admin/polylang.css', array(), $plugin_version);
    include_once WPMTST_INC . 'defaults.php';
    $fields = wpmtst_get_all_fields();
    wpmtst_form_fields_polylang($fields);
    $form_options = get_option('wpmtst_form_options', array());
    wpmtst_form_messages_polylang($form_options['messages']);
    wpmtst_form_options_polylang($form_options);
}