WordPress.org

Forums

Social PopUP - Facebook, Twitter & Google+
[resolved] Option to Not Show Based on OS or Screen Size (5 posts)

  1. paullangphoto
    Member
    Posted 2 years ago #

    Just a suggestion for a future feature. It would be great if there was an option to allow the popup to not show on mobile devices and tablets. Or maybe not show the popup if the user's screen is under a certain size.

    Any suggestions on how to accomplish this now?

    Thanks, great plugin!

    http://wordpress.org/extend/plugins/social-popup/

  2. Damian
    Member
    Plugin Contributor

    Posted 2 years ago #

    Hi I will try to add this feature on next version...

    you could try in the meantime to edit social-popup.php and replace

    function print_script()
    {
    	$options = $this->_options;
    	$credit = $this->_credits;
    ?>
    				<style type="text/css">
    				<?php echo $options['css'];?>
    				</style>
    				<script type="text/javascript">
    					jQuery(document).ready(function() {		
    
    						jQuery().delay('1500').socialPopUP({
    							// Configure display of popup
    							advancedClose: <?php echo $options['close-advanced']; ?>,
    							opacity: "<?php echo $options['bg_opacity']; ?>",
    							days_no_click: "<?php echo $options['days-no-click']; ?>"
    						});
    
    					});
    
    				</script>
    
    <?php
    }

    With

    function print_script()
    {
    	$options = $this->_options;
    	$credit = $this->_credits;
    ?>
    				<style type="text/css">
    				<?php echo $options['css'];?>
    				</style>
    				<script type="text/javascript">
    					jQuery(document).ready(function() {
    						          if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) == false) {
    
    						jQuery().delay('1500').socialPopUP({
    							// Configure display of popup
    							advancedClose: <?php echo $options['close-advanced']; ?>,
    							opacity: "<?php echo $options['bg_opacity']; ?>",
    							days_no_click: "<?php echo $options['days-no-click']; ?>"
    						});
    					}
    					});
    
    				</script>
    
    <?php
    }

    Sorry its hard to format code here :D

  3. paullangphoto
    Member
    Posted 2 years ago #

    Thanks!

  4. Damian
    Member
    Plugin Contributor

    Posted 2 years ago #

    This is included in the next version(1.5) that will be released later this week

  5. Damian
    Member
    Plugin Contributor

    Posted 2 years ago #

    Option now available

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.