PluginProbe
Wp-Insert / trunk
Wp-Insert vtrunk
trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.3.0 1.3.1 1.3.3 1.4 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 2.0 All 63 releases
wp-insert / includes / modules / general / trackingcodes / module.php

module.php in Wp-Insert trunk, at includes/modules/general/trackingcodes/module.php

28 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 require_once __DIR__ . '/functions.php';
3
4 /* Begin Add Assets */
5 add_action( 'wp_insert_modules_js', 'wp_insert_module_trackingcodes_js', 0 );
6 function wp_insert_module_trackingcodes_js() {
7 wp_register_script( 'wp-insert-module-trackingcodes-js', WP_INSERT_URL . 'includes/modules/general/trackingcodes/js/module.js', [ 'wp-insert-js' ], WP_INSERT_VERSION . ( ( WP_INSERT_DEBUG ) ? wp_rand( 0, 9999 ) : '' ), true );
8 wp_enqueue_script( 'wp-insert-module-trackingcodes-js' );
9 }
10 /* End Add Assets */
11
12 /* Begin Add Card in Admin Panel */
13 add_action( 'wp_insert_plugin_card', 'wp_insert_trackingcodes_plugin_card', 80 );
14 function wp_insert_trackingcodes_plugin_card() {
15 echo '<div class="plugin-card">';
16 echo '<div class="plugin-card-top">';
17 echo '<h4>Tracking Codes</h4>';
18 echo '<p>Google Analytics and other embeddable codes directly inserted into the site.</p>';
19 echo '</div>';
20 echo '<div class="plugin-card-bottom">';
21 echo '<p><a id="wp_insert_trackingcodes_google_analytics" href="javascript:;">Google Analytics</a></p>';
22 echo '<p><a id="wp_insert_trackingcodes_header" href="javascript:;">Embed Code in Header</a></p>';
23 echo '<p><a id="wp_insert_trackingcodes_footer" href="javascript:;">Embed Code in Footer</a></p>';
24 echo '</div>';
25 echo '</div>';
26 }
27 /* End Add Card in Admin Panel */
28