I've been trying to use the is_ios() function but it doesn't seem to work. Once the page is compiled where I put my php code using the is_ios() it becomes blank.
This is the footer portion of a Wordpress document.
<?php if ( is_ios() ) : ?>
<a href="instagram://user?username=USERNAME">
<?php else : ?>
<a href="http://www.instagram.com/USERNAME">
<?php endif; ?>
<i class="fa fa-instagram fa-2x" aria-hidden="true"></i></a>
If I were to change <?php if ( is_ios() ) : ?>
to <?php if ( wp_is_mobile() ) : ?>
the code would run fine.
I'm not sure if I need to include something or anything. After looking at the docs for it (https://developer.wordpress.org/reference/classes/wp_customize_manager/is_ios/) I checked to see if the function existed in the correct place and it did. I don't know what else to try. Any insight or help would be appreciated.
FULL CODE
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?>
<footer class="footer text-center">
<div class="container">
<p><strong>
<i class="fa fa-copyright" aria-hidden="true"></i> USERNAME
</strong> <a href="#"><i class="fa fa-facebook-square fa-2x" aria-hidden="true"></i></a>
<a href="https://twitter.com/USERNAME"><i class="fa fa-twitter-square fa-2x" aria-hidden="true"></i></a>
<?php if ( is_ios() ) : ?>
<a href="instagram://user?username=USERNAME">
<?php else : ?>
<a href="http://www.instagram.com/USERNAME">
<?php endif; ?>
<i class="fa fa-instagram fa-2x" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-envelope fa-2x" aria-hidden="true"></i></a>
</p>
</div>
</footer>
<?php wp_footer(); ?>
</body>
</html>