Ejemplo n.º 1
0
/**
 *
 */
function ts_favicons_wp_head()
{
    $options = ts_favicons_get_options();
    extract(wp_parse_args($options, array('favicon' => '', 'favgif' => '', 'apple_precomposed' => 0, 'apple_touch' => '')));
    if (empty($favicon)) {
        $favicon = home_url('/') . 'favicon.ico';
    }
    if (empty($favgif)) {
        $favgif = home_url('/') . 'favicon.gif';
    }
    $precomposed = $apple_precomposed ? '-precomposed' : '';
    if (empty($apple_touch)) {
        $apple_touch = home_url('/') . 'apple-touch-icon' . $precomposed . '.png';
    }
    echo '<link rel="shortcut icon" href="' . $favicon . '" />' . PHP_EOL;
    echo '<link rel="icon" type="image/gif" href="' . $favgif . '" />' . PHP_EOL;
    echo '<link rel="apple-touch-icon' . $precomposed . '" href="' . $apple_touch . '" />' . PHP_EOL;
}
Ejemplo n.º 2
0
function ts_favicons_option_field_apple_precomposed()
{
    $options = ts_favicons_get_options();
    $name = 'apple_precomposed';
    $description = __('Precomposed images are displayed as is, for non-precomposed iOS will generate rounded corners and a reflective shine.');
    ?>
	<label for="<?php 
    echo $name;
    ?>
">
		<input type="checkbox" name="ts_favicons_options[<?php 
    echo $name;
    ?>
]" id="<?php 
    echo $name;
    ?>
" <?php 
    checked('1', $options[$name]);
    ?>
 />
		<?php 
    if (!empty($description)) {
        ?>
 &nbsp; <span class="description"><?php 
        echo $description;
        ?>
</span><?php 
    }
    ?>
	</label>
	<?php 
}