Where can I contribute with pull request?
-
Hi,
We’ve noticed a bug where “Uncaught ReferenceError: Main is not defined at …” which is defined in:
wp_add_inline_script(
ASSET_PREFIX . "-ssba",
sprintf(
'Main.boot( %s );',
wp_json_encode( array() )
)
);We noticed in the client the following:
<script data-no-instant type="text/javascript" src="https://example.com/wp/wp-content/plugins/simple-share-buttons-adder/js/ssba.js?ver=1719322229" id="simple-share-buttons-adder-ssba-js"></script>
<script data-no-instant type="text/javascript" id="simple-share-buttons-adder-ssba-js-after">
/* <![CDATA[ */
Main.boot( [] );
/* ]]> */
</script>The script-source had
/wp/
behind it, when the plugin is not installed in the/wp/
directory but in another directory.
So I was wondering if there is a way where I can provide a pull-request with changes ?How did i fix it on my part?
- in instance.php on line 16 I added:
define( 'SSBA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
2. In php/class-plugin.php I changed the following:
All
/wp-content/plugins/simple-share-buttons-adder/
toSSBA_PLUGIN_URL
So you get registers like:
// Line 57:
wp_register_script(
ASSET_PREFIX . "-ssba",
SSBA_PLUGIN_URL . "js/ssba.js",
array( 'jquery' ),
filemtime( DIR_PATH . "js/ssba.js" ),
true
);
// Line 77:
wp_register_style(
ASSET_PREFIX . "-ssba",
SSBA_PLUGIN_URL . "css/ssba.css",
array(),
filemtime( DIR_PATH . "css/ssba.css" )
);
Looking forward for your reply,
regards,
Paul – Senior Frontend developer at Acato.nl
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.