ID ) ? absint( $post->ID ) : 0; $bridge_url = self::get_bridge_url(); self::enqueue_script(); wp_localize_script( self::SCRIPT_HANDLE, 'videopressAjax', array( 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 'bridgeUrl' => $bridge_url, 'post_id' => $post_id, ) ); } /** * Enqueues only the JS script * * @param string $handle The script handle to identify the script. * @return bool True if the script was successfully localized, false otherwise. */ public static function enqueue_script( $handle = self::SCRIPT_HANDLE ) { return wp_enqueue_script( $handle, self::get_bridge_url(), array(), Package_Version::PACKAGE_VERSION, false ); } }