Leaflet plugin breaks this plugin
-
Hi,
I have found that the find shortcode plugin breaks when the leaflet plugin is present.I have done some digging and it seems to be in the …util.php file. It is expecting $callback[0] to be an object where it seems to be a string for tags from this plugin. If I add the code below the search works correct – and the error log lists the offending items. Without doing this I get a 500; I have the Leaflet Map and Extensions for Leaflet Map plugins installed (and can’t deactivate them as it is them that I need to search for!)
function sf_admin_page_shortcode_origin( $callback ) { try { if ( is_array( $callback ) ) { $callback_type = 'class'; <strong> if (is_string($callback[0])) { error_log( "<P>element is " . $callback[0] ) ; return null; }[24-May-2022 11:38:25 UTC] <P>element is Leaflet_Geojson_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Image_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Kml_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Gpx_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Line_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Polygon_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Circle_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Map_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Marker_Shortcode [24-May-2022 11:38:25 UTC] <P>element is Leaflet_Scale_ShortcodeI have managed to get it working for my purposes but I am hoping this is useful for you regarding the plugin.
Thanks for a really useful tool.
The topic ‘Leaflet plugin breaks this plugin’ is closed to new replies.