Skip to content

Instantly share code, notes, and snippets.

@Garconis
Created September 25, 2017 15:05
Show Gist options
  • Select an option

  • Save Garconis/34b6be24ee644c024663ef1d2e11e2bb to your computer and use it in GitHub Desktop.

Select an option

Save Garconis/34b6be24ee644c024663ef1d2e11e2bb to your computer and use it in GitHub Desktop.

Revisions

  1. Garconis created this gist Sep 25, 2017.
    14 changes: 14 additions & 0 deletions divi-viewport-pinch-to-zoom.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    <?php

    // Removes et_add_viewport_meta from the wp_head phase
    function remove_divi_actions() {
    remove_action( 'wp_head', 'et_add_viewport_meta' );
    }
    // Call 'remove_divi_actions' during WP initialization
    add_action('init','remove_divi_actions');

    // add ability to pinch and zoom
    function et_new_viewport_meta(){
    echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=1" />';
    }
    add_action( 'wp_head', 'et_new_viewport_meta', 15 );