Ejemplo n.º 1
0
</tr>
<?php 
// Show contact text field only WP Contact Form 7 Plugin is active.
if (is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
    ?>
<tr>
    <th><label for="header[contactPage]"><?php 
    echo __('Contact page', 'vhl');
    ?>
</label></th>
    <td colspan="2">
        <select id="header[contactPage]" name="header[contactPage]">
            <option></option>
        <?php 
    if (is_plugin_active('multi-language-framework/multi-language-framework.php')) {
        $default_language = mlf_get_option('default_language');
        if ($default_language != $site_lang) {
            $sufix = '_t_' . $site_lang;
        }
    } else {
        $sufix = '';
    }
    $args = array('post_type' => 'page' . $sufix);
    $loop = new WP_Query($args);
    while ($loop->have_posts()) {
        $loop->the_post();
        ?>
                <option value="<?php 
        the_ID();
        ?>
" <?php 
Ejemplo n.º 2
0
function comment_reply_filter($link)
{
    if (is_plugin_active('multi-language-framework/multi-language-framework.php')) {
        $language = strtolower(get_bloginfo('language'));
        $prefix = substr($language, 0, 2);
        if ($prefix == mlf_get_option('default_language')) {
            $prefix = '';
        } else {
            $prefix = '/' . $prefix;
        }
    } else {
        $prefix = '';
    }
    return str_replace($_SERVER[REQUEST_URI], $prefix . $_SERVER[REQUEST_URI], $link);
}
Ejemplo n.º 3
0
<?php

$header = $settings['header'];
$current_language = strtolower(get_bloginfo('language'));
$site_lang = substr($current_language, 0, 2);
if (is_plugin_active('multi-language-framework/multi-language-framework.php')) {
    $enabled_langs = mlf_get_option('enabled_languages');
} else {
    $enabled_langs = array($site_lang);
}
?>
<tr>
	<th><?php 
echo __('Logo', 'vhl');
?>
</th>
	<th><?php 
echo __('Image URL', 'vhl');
?>
</th>
	<th><?php 
echo __('Link', 'vhl');
?>
</th>
</tr>
<?php 
foreach ($enabled_langs as $lang) {
    ?>
<tr>
	<th><label><?php 
    echo strtoupper($lang);