Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Before and After shortcode actions

Ankur Kumar edited this page Mar 18, 2017 · 4 revisions

This plugin exposes some handful actions that allows you to do something before and after shortcode.

  • agm-before-shortcode
  • agm-after-shortcode

Examples

Disable Google Map API script

// wp-content/yourtheme/functions.php
add_action('agm-after-shortcode', function () {
    wp_dequeue_script('agm-google-map-api');
});
  • Above snippet is useful when your theme is already using Google Map JS and you are seeing this error in console
You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
  • Above code will be disable the Google Map script loaded by this plugin.

Clone this wiki locally