post_type ) { $map_api_key = ! empty( $map_settings['api_key'] ) ? '&key='.$map_settings['api_key'] : ''; wp_enqueue_script( ACADP_PLUGIN_NAME.'-google-map', 'https://maps.googleapis.com/maps/api/js?v=3.exp'.$map_api_key ); } wp_enqueue_script( ACADP_PLUGIN_NAME, ACADP_PLUGIN_URL . 'admin/js/acadp-admin.js', array( 'jquery' ), ACADP_VERSION_NUM, false ); wp_localize_script( ACADP_PLUGIN_NAME, 'acadp', array( 'ajax_nonce' => wp_create_nonce( 'acadp_ajax_nonce' ), 'edit' => __( 'Edit', 'advanced-classifieds-and-directory-pro' ), 'delete_permanently' => __( 'Delete Permanently', 'advanced-classifieds-and-directory-pro' ), 'zoom_level' => $map_settings['zoom_level'] ) ); } /** * Display Admin Notices. * * @since 1.0.0 * @access public */ public function admin_notices() { $screen = get_current_screen(); $post_type = $screen->post_type; if ( 'post' == $post_type || 'page' == $post_type ) { return; } if ( false == get_option( 'acadp_admin_notice_dismissed' ) ) : ?>