base, 'achtm' ) !== false ) { wp_enqueue_style( 'achtm_style', ACHTM_URL. 'assets/css/style.css', array(), '1.0.0' ); wp_style_add_data( 'achtm_style', 'rtl', 'replace' ); wp_enqueue_style( 'load-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' ); wp_enqueue_script( 'jquery-achTabs', ACHTM_URL. 'assets/js/jquery-achtmTabs.js', array(), '1.0.0', false ); } } add_action( 'admin_enqueue_scripts', 'achtm_admin_style', 100, 10 ); // Plugin activation hook and notice. register_activation_hook( __FILE__, 'achtm_plugin_activation' ); register_deactivation_hook( __FILE__, 'achtm_plugin_deactivation' ); function achtm_plugin_activation() { if ( ! current_user_can( 'activate_plugins' ) ) { return; } set_transient( 'achtm-admin-notice-on-activation', true, 5 ); } /* function achtm_plugin_deactivation() { if( get_option( 'achtm_google_anaytics_code' ) ) { delete_option( 'achtm_google_anaytics_code' ); } if( get_option( 'achtm_tag_manager_id' ) ) { delete_option( 'achtm_tag_manager_id' ); } if( get_option( 'achtm_google_measurement_id' ) ) { delete_option( 'achtm_google_measurement_id' ); } } */ function achtm_plugin_install_notice() { if( get_transient( 'achtm-admin-notice-on-activation' ) ) { ?>

here to configure plugin settings.', 'ach-tag-manager' ), 'ACh Tag Manager', ACHTM_PLUGIN_VERSION, admin_url( 'options-general.php?page=achtm' ) ); ?>

' . __( 'Manage', 'ach-tag-manager' ) . '', ); return array_merge( $rmlinks, $links ); } add_filter( 'plugin_action_links_' . ACHTM_BASENAME, 'achtm_add_action_links', 10, 2 ); // plugin row links and elements. function achtm_plugin_meta_links( $links, $file ) { $plugin = ACHTM_BASENAME; if ( $file == $plugin ) // only for this plugin return array_merge( $links, array( '' . __( 'Support', 'ach-tag-manager' ) . '' ), array( '' . __( 'Buy developer a coffee', 'ach-tag-manager' ) . '' ) ); return $links; } add_filter( 'plugin_row_meta', 'achtm_plugin_meta_links', 10, 2 ); /* * load language */ function achtm_load_textdomain() { load_plugin_textdomain('ach-tag-manager', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/'); } add_action('plugins_loaded', 'achtm_load_textdomain'); #add AChTM settings in admin side panel. function admin_menu_achtm_settings() { add_options_page( 'ACh Tag Manager', 'ACh Tag Manager', 'manage_options', 'achtm', 'achtm_option_page'); } add_action('admin_menu', 'admin_menu_achtm_settings'); ?>